Workarounds for Lack of Mutable Keyword

Janice Caron caron800 at googlemail.com
Thu Apr 3 03:04:04 PDT 2008


On 03/04/2008, Craig Black <craigblack2 at cox.net> wrote:
>  If that compiles, I think it may be a bug.  Invariant types shouldn't be
> implicitly convertible to const.

Yes they should.

const means "I promise not to modify this". There is absolutely no
problem with promising not to modify something which is invariant.



More information about the Digitalmars-d mailing list