strong enums: why implicit conversion to basetype?
Manfred Nowak
svv1999 at hotmail.com
Thu Jan 26 14:26:54 PST 2012
Trass3r wrote:
> It's ill-defined. There are 4 possible types of typedef:
> http://d.puremagic.com/issues/show_bug.cgi?id=5467
[...]
> Again, this thread is all about discussing the right way to do it
> and not about what the buggy and holey spec reads.
[...]
> I don't see any merit in that.
You meight be blind. The only way to eject this possibility is to prove
that there cannot be any merit.
Currently a good approximation of your intentions for the replacment of
`enum's seems to be a wood of rooted almost-DAGs on types, where the
edges in the DAGs represent the allowed implicit conversions, the inner
nodes are represented by tags and the leaves are represented by
members. Maybe that the "almost" is not necessary.
-manfred
More information about the Digitalmars-d
mailing list