Walter Bright, el  5 de April a las 11:04 me escribiste:
> On 4/5/2014 2:40 AM, Leandro Lucarella wrote:
> >enum Symbolic { Dogs, Cars, Trees }    // not implicitly casteable (and
> >                                    // maybe not even expose the
> >                                    // internal value)
> >
> >?
> 
> 
> struct Symbolic {
>     private static struct _impl { private int x; }
>     enum Dogs = _impl(0);
>     enum Cars = _impl(1);
>     enum Trees = _impl(2);
> }
> 
> Of course, you can hide all this in a template.

Well, you can "emulate" enums as they are now with structs too, so that
doesn't change anything in the argument about why to provide syntax
sugar for one and not the other.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/

Reply via email to