This code is accepted by the D compiler:

enum Foo { A, B, C }
void main() {
    bool[5] bools;
    auto b = bools[2] != Foo.C;
    bools[2] = Foo.A;
}


Who is that likes such kind of code? What are the advantages of accepting such kind of code? I can see the disadvantages and risks.

Bye,
bearophile

Reply via email to