Extended Type Design.

Don Clugston dac at nospam.com.au
Fri Mar 16 12:54:49 PDT 2007


Andrei Alexandrescu (See Website For Email) wrote:
> Benji Smith wrote:
>> I vote for "readonly" and "const". Anything else seems like a mistake.
> 
> Which is which? How would you have people distinguish them without 
> running to the manual? How would you explain C++ immigrants that const 
> is actually readonly, and there is a const, but that const means 
> something else than their const?

Hospitality to C++ immigrants is definitely important. But since C++ 
const is broken, there's inevitably going to be some culture shock.

I think we're OK as long as D const is more restrictive than C++ const
  -- so that writing C++ code in D will either work the same as in C++, 
or fail to compile.
And I don't think that the confusion exists for anyone other than C++ 
programmers.

Don



More information about the Digitalmars-d mailing list