Why D const is annoying
Mehrdad
wfunction at hotmail.com
Tue May 1 23:44:30 PDT 2012
You said:
"In C++, the compiler can't use it to provide any real **guarantees**..."
Now you're telling me D doesn't guarantee it either.
And then go on telling me about how D uses const-ness to make assumptions
and improve performance.
Isn't your answer orthogonal to your claim? o.O
Whether the compiler makes **GUARANTEES** about code is _irrelevant_ to
whether or not the language uses 'const' to improve performance.
You could very well have a language which **enforces** const-ness (i.e.
doesn't prevent casting it away), but which _doesn't_ use it to improve
performance.
Or which does.
The dot product of your answer with my question was zero. :(
More information about the Digitalmars-d
mailing list