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

Robert Virding robert.virding@REDACTED
Sun Apr 22 22:06:11 CEST 2012


There have been suggestions along this path earlier. Unfortunately it will only work occasionally. It would allow you to write things like Foo{a=7} or perhaps Foo#{a=7}. I will admit I don't see the need, but then I am corrupted. 

Robert 

----- Original Message -----

> Changing the subject slightly.

> One thing that would be nice is given:

> -record(foo, {a = 1, b = 2}).

> t() ->
> Foo = #foo{a = 8, b = 7},
> Foo#foo.a.

> That since the pre-processor has seen that Foo is bound to a record
> #foo that I could do this instead:

> t() ->
> Foo = #foo{a = 8, b = 7},
> Foo.a.

> Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120422/25b3765d/attachment.htm>


More information about the erlang-questions mailing list