Types soup with enum and bool
bearophile
bearophileHUGS at lycos.com
Tue Oct 29 11:23:02 PDT 2013
Ali Çehreli:
> >> enum Foo { A, B, C }
> >> void main() {
> >> bool[5] bools;
> >> auto b = bools[2] != Foo.C;
> >> bools[2] = Foo.A;
> >> }
>...
> There was a long discussion about that. Walter was happy that
> bool was a integer type. Many of us had objections:
My problem is mostly with enums. I don't remember Walter
explaining the rationale of the D enum conversion design. I
prefer the C++11 enums.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list