Logical const

Steven Schveighoffer schveiguy at yahoo.com
Mon Nov 29 13:17:24 PST 2010


On Mon, 29 Nov 2010 15:58:10 -0500, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> Steven Schveighoffer wrote:
>> Having a logical const feature in D would not be a convention, it would  
>> be enforced, as much as const is enforced.  I don't understand why  
>> issues with C++ const or C++'s mutable feature makes any correlations  
>> on how a D logical const system would fare.  C++ const is not D const,  
>> not even close.
>
>
> Because people coming from C++ ask "why not do it like C++'s?"

I don't get it.  A way to make a field mutable in a transitively-const  
system is syntactically similar to C++, but it's not the same.  Having a  
logical-const feature in D does not devolve D's const into C++'s const.   
If anything it's just a political problem.

-Steve


More information about the Digitalmars-d mailing list