Extended Type Design.

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Fri Mar 16 14:23:19 PDT 2007


Don Clugston wrote:
> 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.

Let me say it again: we know why it's broken. We will provide a fixed 
equivalent, not something entirely different. It's only natural to call 
the fixed equivalent the same.

> 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.

Which are in the millions :o).


Andrei



More information about the Digitalmars-d mailing list