DMD 1.035 and 2.019 releases
Jarrett Billingsley
jarrett.billingsley at gmail.com
Thu Sep 4 14:20:35 PDT 2008
On Thu, Sep 4, 2008 at 2:09 PM, Leandro Lucarella <llucax at gmail.com> wrote:
> Walter Bright, el 4 de septiembre a las 10:26 me escribiste:
>> Tomas Lindquist Olsen wrote:
>> >This is one of those things I really dislike about D :(
>> >It's really nice that we can override struct initialization, but the fact that
>> >it eliminates the possibility to override it (with a nice syntax) makes it much
>> >less appealing IMHO.
>> >The most important point to me, is that old thing about static struct
>> >initializer and struct literals have different syntaxes, and that the static
>> >variant is much more flexible.
>> >I would have loved to see the static struct initializer syntax become an
>> >expression. If the problem is ambiguity, why not just prefix the {} braces with
>> >the struct name?
>>
>> The static struct initializers more or less are inherited from C. I'd eventually
>> like to abandon them and go completely to the S(args) syntax.
>
> But they are much more flexible than constructor, it's like a constructor
> with named arguments! =)
>
> If you add support to named arguments, then I'll agree ;)
>
Ah, now there's a compromise I'd be more than willing to accept. If
we didn't get S{} style struct literals, but were able to do S(x: 5,
y: 10), that would be just as good.
Named parameters are sooo easy! Please implement them!
More information about the Digitalmars-d-announce
mailing list