const challenge

Janice Caron caron800 at googlemail.com
Sun Feb 3 11:32:45 PST 2008


On 03/02/2008, Christopher Wright <dhasenan at gmail.com> wrote:
> More simply, catenation of a mutable variable with a non-mutable one
> could yield a mutable one by default. A const cast is safer than a
> non-const cast, after all.

Except that "non-mutable" doesn't necessarily mean const, and
"non-const" doesn't necessarily mean mutable. I think you left
invariant out of the mix there.


> This might reduce the usage of const. Walter doesn't seem concerned
> about that, since he ignored just about everyone here when we asked for
> function arguments to be const by default.

I wouldn't say no to revisiting that possibility! :-)



More information about the Digitalmars-d mailing list