2010/11/30 Walter Bright <newshou...@digitalmars.com>

> so wrote:
>
>> No need to go that far.
>>
>> void fn(const A, A) {...}
>> A a;
>> fn(a, a); // what do you expect here?
>>
>> As far as i know D/C++ have the same treatment for const member functions.
>> It has been this way forever.
>>
>
>
> Yup. It's why I think it is worthwhile that I spend time in this thread
> explaining things over and over. There are a lot of mistaken assumptions and
> baggage people carry around about const in both D and C++.
>
>
I've been following this thread on and off, but is there a definition
somewhere of exactly what "const" means in D2 and exactly what that
guaranties or doesn't guaranty?

>
> (One of the ironies of C++ const is that programmers assume it behaves like
> D const/immutable, but rely on it not doing so.)
>

Reply via email to