How to break const
Mehrdad
wfunction at hotmail.com
Mon Jun 18 09:30:06 PDT 2012
On Monday, 18 June 2012 at 16:23:39 UTC, Timon Gehr wrote:
> I agree. Some of the keywords are poorly chosen, but this does
> not have any actual _practical_ implications for coding.
> Changing them, however, does.
Not sure if this was intended to be referring to my post or not,
but just to clarify:
The real problem is _not_ the fact that there is a technical
issue with const/pure/immutable/whatever.
Like you said, that might not have any practical consequences.
The problem is that when the compiler _uses_ const/pure/immutable
to make decisions regarding optimizations.
When that's the case, then IMHO they **MUST** be foolproof, no
matter how rare/common they are (assuming no casts and such, to
subvert the system).
Otherwise the compiler generates wrong binaries for correct code.
More information about the Digitalmars-d
mailing list