Enum inheritance

BCS BCS at pathlink.com
Wed Aug 15 13:18:51 PDT 2007


Matthias Walter wrote:
> Robert Fraser Wrote:
> 
> 
>>Matthias Walter Wrote:
>>
>>
>>>For my current project, I would be happy to have some kind of enum inheritance, is it on the plan for future changes to D?
>>
>>I made a number of enum extensions that renders each enum as a mixinable template that creates a struct. They allow pretty much everything people have been asking for in enums short of Java-style "enum classes." They have string printing, enum extension, iteration through enum values, ... Yeah, that's about it. And they're still only represented by one int, so no performance penalties.
>>
>>I can post them if you want... Maybe I should put them in Scrapple.
> 
> 
> I'm not in a hurry, so putting them in scrapple would be a good idea.
> 
> thanks
> Matthias

go ahead! that's what scrapple is for. (If you need access email me 
shro882 at vandals dot uidaho dot edu)



More information about the Digitalmars-d mailing list