Storage class consistency
Steven Schveighoffer
schveiguy at yahoo.com
Sun Apr 6 06:52:19 PDT 2008
"Robert Fraser" wrote
> Okay, I know everyone wants to put "enum" to rest, but I just want an
> explanation for why "enum" was chosen in the facre of syntactic
> difficulties. In particular, what I mean is that for every other storage
> class the following is possible:
>
> public
> {
> int x = 5;
> float f = 7.0;
> }
>
> const
> {
> int x = 5;
> float y = 7.0;
> }
>
> ... but not with enum ...
>
> enum
> {
> int x = 5;
> float y = 7.0;
> }
I haven't used D2 since this was added, but from what I understood about it,
this should work. If not, it should be a bug.
-Steve
More information about the Digitalmars-d
mailing list