Enum inheritance

Matthias Walter walter at mail.math.uni-magdeburg.de
Wed Aug 15 10:12:57 PDT 2007


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?

Syntactically, it should only be an extension to the specification of an enum base type via

enum Name : Base { Symbols, ... }

Why not allow other enums as a Base to import their symbols? As long as one does not think about multiple inheritance (or enum-interfaces <g>), this shouldn't be problem?! Or is it already implemented and I missed something?

best regards
Matthias



More information about the Digitalmars-d mailing list