enhancing enums

Nick Sabalausky a at a.a
Tue Dec 8 17:19:22 PST 2009


"Ellery Newcomer" <ellery-newcomer at utulsa.edu> wrote in message 
news:hfmssk$2n2d$1 at digitalmars.com...
> On 12/08/2009 06:35 PM, Nick Sabalausky wrote:
>> "bearophile"<bearophileHUGS at lycos.com>  wrote in message
>> news:hfmlkl$1kil$1 at digitalmars.com...
>>> hehe45:
>>>
>>>> In c++ it is valid syntax to have trailing commas at the and of enum
>>>> definitions:
>>>> enum {a, b, c, };
>>>> This would be a useful addition to D too.
>>>
>>> I think that's already possible in D1.
>>>
>>
>> That's right. And I think it's also allowed for array literals. Very 
>> handly
>> feature. Although I had no idea that C++ also allowed it.
>>
>>
>
> it's only allowed for array initializers

Oh yea, that's right. A real strange inconsistency. I hope that gets fixed 
for D2. 





More information about the Digitalmars-d mailing list