Has there been any further consideration on this topic? Structs are great, 
but they feel severely limited without the ability to easily and cleanly 
define arbitrarily named structs.


On Wednesday, March 19, 2014 at 5:43:45 PM UTC-4, José Valim wrote:
>
> That won't be the case for now. Structs are different than records. Cases 
> where you define a module simply to define a struct should be more 
> uncommon, I expect it to rather have struct-related functions the majority 
> of the time.
>
> So having only defstruct/1 will help send this message across. After v0.13 
> is out and we are more familiar with structs, we can re-evaluate the 
> shortcut syntax again.
>
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Lead Developer
>
>
> On Wed, Mar 19, 2014 at 10:20 PM, Dave Thomas <[email protected] 
> <javascript:>> wrote:
>
>> Would there be any support for extending defstruct so that
>>
>> defstruct Person, name: "", age: 21
>>
>> was a shortcut for
>>
>> defmodule Person
>>   defstruct name: "", age: 21
>> end
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/716bde83-ad19-46ad-896f-90be5493c035%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to