I've also written this implementation of enumerations. It's a bit different from normal D enums, but supports inheritance, guarantees unique values, as is much more conservative in what conversions and operations it allows.

I'm considering adding addition and subtraction of integers as valid operations, but I'm not sure I want to.

Feel free to critique, hack, improve upon and otherwise use and abuse the code.


--
Simen

Attachment: enumeration.d
Description: Binary data

Reply via email to