[erlang-questions] The compiler "eats" structures which are not separated by commas

Richard O'Keefe <>
Mon Apr 23 02:19:12 CEST 2012

On 22/04/2012, at 9:04 AM, Jan Burse wrote:
>  Use different syntactic forms, i.e. for example:
>     Constructur: #Name{Field1=Expr1,...}
>     Setter: Expr #setName{Field1=Expr1,...}
>     Getter: Expr #getName.Field

Saints preserve us!  As if C envy weren't bad enough,
now we have Java envy.  And if that weren't bad enough,
the disgusting 'set' and 'get' prefixes are on the
wrong words entirely!  Just distinguish clearly between
*binding* a field and *replacing* it and all will be wall:

	Expr#Name{Field1 := Expr1, ..., Fieldn := Exprn}
	                 ^                     ^

After all, there is nothing that stops someone using a
record whose name begins with 'set' or 'get'.

More information about the erlang-questions mailing list