enum

Walter Bright newshound2 at digitalmars.com
Fri Apr 11 03:07:14 PDT 2014


On 4/11/2014 12:03 AM, Walter Bright wrote:
> On 4/10/2014 11:33 PM, Jacob Carlborg wrote:
>> Then you might want to use a struct instead.
>
> I have said the same about the use case of an enum that only consists of its
> named values.


The point being that D is powerful enough that you can use structs and templates 
to create all kinds of types with custom behaviors. They don't all need to be 
baked into the core language.


More information about the Digitalmars-d mailing list