need clarification: will typedef, C struct initialization, etc.

Ellery Newcomer ellery-newcomer at utulsa.edu
Sun Jun 6 09:29:02 PDT 2010


On 06/06/2010 10:47 AM, bearophile wrote:
> Ellery Newcomer:
>> Ooo Ooo Ooo Can we get rid of them? Pretty pretty please?
>
> Why are you so eager to remove them?
>
> (They are not essential, D has plenty of other ways (maybe even too many) to instantiate a struct. But I have appreciated C-style struct initializers in D because they give a more compact syntax when I have to define many small structs inside an array literal).
>
> Bye,
> bearophile

because they're difficult to disambiguate from function literals (at 
least dmd doesn't do it correctly)

because they entail a lot of lookahead (I don't know, but I suspect they 
are the cause for most of the slowness in my parser)

because they're the only reason we have ArrayInitializer and without 
them we could merge it with ArrayLiteral


I won't disagree that it's a nice syntax, though.


More information about the Digitalmars-d mailing list