so what exactly is const supposed to mean?

Hasan Aljudy hasan.aljudy at gmail.com
Mon Jul 3 11:34:47 PDT 2006


Lars Ivar Igesund wrote:
> Hasan Aljudy wrote:
> 
>>damn, this doesn't sound too good.
>>I for one don't give a damn about const, so why should I be bothered to
>>think about the constness of my code/classes and add "mutable"
>>qualifiers all over the place?
> 
> 
> Hmm, this sounds bad, for you ... you are aware that immutable objects are
> your guarantee in multithreaded system to have safe sharing of data? Have
> you looked at any well designed library in languages like C++, Java or C#?
> Try to count the immutable classes present, I think you'll find quite a
> few. 
> 

Let me repeat:
Is there anything preventing anyone from creating immutable classes?



More information about the Digitalmars-d-learn mailing list