[erlang-questions] Dynamically access record fields

Loïc Hoguin essen@REDACTED
Mon Feb 11 08:50:02 CET 2013


- Micro optimization. Most applications wouldn't care for it either
- That's a developer's choice
- BS, you have the same issue with Var = #rec.field, no difference there
- See previous point

ok@REDACTED wrote:

>
>> I just don't see the harm in allowing the former, but I'm completely
>> prepared to ignore this issue entirely for now.
>>
>The harm in dynamic field names includes but is not limited to:
> - slowing programs down
> - making code less readable for human beings
> - reducing the effectiveness of type checking
> - inadvertently providing wider indirect access to fields
>   than intended compared with hand-written access functions
>
>
>_______________________________________________
>erlang-questions mailing list
>erlang-questions@REDACTED
>http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list