Why do we have transitive const, again?

so so at so.so
Fri Sep 23 11:33:48 PDT 2011


On Fri, 23 Sep 2011 21:21:31 +0300, Mehrdad <wfunction at hotmail.com> wrote:

> Er, you answered a question about const with an answer about immutable.  
> :\
>
> My point is, what in the world does transitive const have to do with  
> transitive immutable?
> Can't you have immutable(T) be transitive while const(T) being "normal",  
> as in C/C++? If not, why not?

No you can't, i think you misunderstood the const in D. Without it  
immutable is close to worthless. You would have to implement every  
function for mutable and immutable.


More information about the Digitalmars-d mailing list