Le 11/03/2012 23:12, Walter Bright a écrit :
On 3/11/2012 2:51 PM, bearophile wrote:
And sometimes, a name change can be a huge win - the
invariant=>immutable
one is an example. But I think that's an exceptional case, not a rule.

I was among the ones that have asked for that name change. But
"immutable" is
a quite long word. Now I think the "val" used by Scala is better, it uses
less space for something I use often enough. "imm" is another option,
but it
looks less nice :-)

The reason we went with "immutable" is for any other name, I'd be
constantly explaining:

"xyzzy" means immutable

And I did just that for "invariant". Over and over and over. People
immediately get what "immutable" means, like for no other name. So
consider "immutable" a labor saving device for me.

We have the same phenomena with dur and return type type qualifier (ie: why does const int* fun() isn't compiling ? Because const is qualifying the function, not the return type).

Both are recurring questions and so should be as important as immutable. But both are major breaking change.

Reply via email to