Epoll for D2
bearophile
bearophileHUGS at lycos.com
Sat Sep 8 06:39:58 PDT 2012
Adil Baig:
> "are kind of (but not really) strongly typed" - I didnt know
> that. How?
D allows code like:
enum Foo { V1 = 10 }
void main() {
assert(Foo.V1 == 10);
}
But C++11 enums are strongly typed, and similar code is a
compilation error:
enum class Foo { V1 = 10 };
int main() {
int b = Foo::V1 == 10;
}
Maybe Walter thinks that in similar cases forcing the usage of
cast(int) introduces some risks that are not worth, so he has
designed enums half-strongly typed. D contains several other
equally mysterious design decisions :-)
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=3999
> I'm thinking
> Events.* ; Events.IN, Events.HUP etc. Succinct and fairly
> obvious. Looks good?
What about Events.in, Events.hup, etc? :-)
Bye,
bearophile
More information about the Digitalmars-d-announce
mailing list