Enum "Inheritance"?
%u
wfunction at hotmail.com
Sat Feb 26 22:19:33 PST 2011
> I know some people don't like using mixins, but I think that's
really the best way to achieve that effect without loosing DIY and
without resorting to something more heavy-weight
> ...
> That just gave me an idea: I think you should be able to get away
with an ordinary union
I thought about those, but ultimately, the problem is that they're
not extensible: if a new type of access mask is introduced. In the
former case, I can't AND it with a generic access mask to test what
the result is, because they're of different types; in the latter
case, there's no way to extend this whatsoever. :\
I'm trying to keep this extensible while avoiding code duplication,
and it's proven to be surprisingly hard to do this neatly.
More information about the Digitalmars-d
mailing list