[erlang-questions] Robustness problems when using records [WAS: Re: Question/Alternative on Frames Proposal [Warning: Long]]

eigenfunction emeka_1978@REDACTED
Sun May 20 14:21:09 CEST 2012


> There is a very simple way of
> avoiding this problem that IMO is a very nice way of programming: Use
> records as abstract data types and have them in a single module that
> exports appropriate getters and setters for manipulating fields of the
> record. If, for whatever reason, you do not like this way of using
> records and want the ability to perform pattern matching and field
> extraction in more than one module as you do today with records, better
> make sure you use an appropriate Makefile (or equivalent) for compiling
> your application. It's not the fault of record syntax if you do not use
> such a mechanism! (Makefiles are technology of the 70's after all...)

Would you care to elaborate with a simple example in the context of a
gen_server?
I definitely feel guilty of what you are describing.



More information about the erlang-questions mailing list