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

Reply via email to