What guarantees does D 'const' provide, compared to C++?

Walter Bright newshound2 at digitalmars.com
Fri Aug 17 13:45:37 PDT 2012


On 8/16/2012 6:43 PM, Mehrdad wrote:
> On Friday, 17 August 2012 at 01:25:18 UTC, Chris Cain wrote:
>> Yeah. Again, you can't modify __the const view__.
>
> Isn't that kinda useless, if it tells you nothing about the object itself?

It means you can write code that can process both mutable and immutable objects.



More information about the Digitalmars-d mailing list