[erlang-questions] Generating a variable in a macro

Ladislav Lenart lenartlad@REDACTED
Tue Jan 9 17:40:40 CET 2007


Thomas Lindgren wrote:
> --- Mats Cronqvist <mats.cronqvist@REDACTED>
> wrote:
>>    why the record_info functions are not laid out in
>> the beam files (like the 
>> module_info functions) is a mystery to me. surely
>> that would be The Right Thing 
>> (tm).
> 
> Well, that might give users the idea that records are
> more than syntactic sugar for tuples. But they're not.
But they should do their best to pretend the opposite.
Otherwise the programmer has to mess with their internals
until one day he realizes that a life might be a little
easier without them... :-)

Just take a look at today's discussion threads:
   * Generating a variable in a macro - the core of the
     problem is that record_info is not a normal function.
   * Accessing default values of a record - not having
     this functionality can introduce code duplication.

Ladislav Lenart




More information about the erlang-questions mailing list