AA key conversion woes

bearophile bearophileHUGS at lycos.com
Tue Apr 17 13:13:49 PDT 2012


> http://d.puremagic.com/issues/show_bug.cgi?id=6253

Maybe it needs a bit more explanation. It goes according to this 
idea:
http://en.wikipedia.org/wiki/Principle_of_least_astonishment

If I define:
Foo[] a;
I expect those Foo items to be mutable.

If I see:
int[Foo]
I expect those Foo keys to be mutable.

If I see:
int[Foo]
I expect those Foo keys to be mutable.

If I see:
int[immutable Foo]
I expect those Foo keys to be immutable.

If I see a int[Foo] and I get immutable Foo keys, I am astonished.

Not doing what I am saying here will add another special case to 
D language. Avoiding many special cases is one the reasons I 
program in D instead of C++.

Bye,
bearophile


More information about the Digitalmars-d mailing list