[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

More information about the erlang-questions mailing list