Wrong enum comparisons

bearophile bearophileHUGS at lycos.com
Mon May 28 04:11:27 PDT 2012


Denis Shelomovskij:

> Enumerations are in very poor state in D now.
> ...
> By the way, current enums can be modified to correspond "list" 
> enumeration and flags can be added as library component.

I think D enums need to become a bit more strict (so you can't 
equal elements of different enums). Later I think the messy 
situation with enum attributes needs to be cleared up and 
improved, removing most of the name clases between the current 
attributes and enum item names 
(http://d.puremagic.com/issues/show_bug.cgi?id=4997 ). And later 
*simple* flags are implementable in Phobos.

First step is to make them less sloppy and more strict, otherwise 
successive work will be founded on quicksand (but as long as such 
threads generate no concrete answers from D designers, we are 
just wasting time here).

In GitHub there are many patches open, applying several of them 
will reduce many current pain points of using D.

Bye,
bearophile


More information about the Digitalmars-d mailing list