Congratulations to the D Team!

Steven Schveighoffer schveiguy at yahoo.com
Thu Jul 12 06:16:26 PDT 2012


On Wed, 11 Jul 2012 17:20:08 -0400, deadalnix <deadalnix at gmail.com> wrote:

> Const is a bridge between mutable and immutable world. The guarantee  
> proposed with const is that it never mutate an immutable data. This is  
> slightly different than how const is implemented actually, but still  
> ensure that no immutable data is muted.

No.  Const is a contract saying the function will not modify the data  
given to it via that parameter.  It's useful when reasoning about code.

When you can modify data passed via a const pointer the entire concept of  
const becomes convention.

-Steve


More information about the Digitalmars-d mailing list