Enum inheritance
Robert Fraser
fraserofthenight at gmail.com
Wed Aug 15 11:27:15 PDT 2007
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.
More information about the Digitalmars-d
mailing list