Design of reflective enums
renoX
renosky at free.fr
Tue Feb 20 12:45:50 PST 2007
I've ran into trouble trying to implement the associative array:
apparently it's not possible to build an associative array at compile time.
Added to that the fact that overloading of functions doesn't work
correctly on enums, the implementation of good reflective enum starts to
look really difficult..
So it's a choice between
-using your initial implementation, which is not typesafe..
-restricting reflective enums to enums without '=' ie with values going
0,1,2..
-waiting that Walter fix the current limitations on associative arrays
or the bug(?) on function overloading with enums (overloading with a
typedef has the same issue, so maybe it's me who doesn't understand the
overload behaviour?)..
:-(
renoX
More information about the Digitalmars-d
mailing list