What purpose to const besides functional programming?

Walter Bright newshound1 at digitalmars.com
Wed Jul 23 17:13:00 PDT 2008


Sean Kelly wrote:
> I think the only point of an 'invariant' or even a 'const' label for 
> member functions is just that--a way to indicate to the compiler that 
> the hidden context pointer is invariant or const.

Yes. That is all it is. It says nothing about the purity of the function.



More information about the Digitalmars-d mailing list