On Tue, 16 Mar 2010 17:27:26 -0400, Walter Bright
<[email protected]> wrote:
Steven Schveighoffer wrote:
On Tue, 16 Mar 2010 17:18:39 -0400, Walter Bright
<[email protected]> wrote:
bearophile wrote:
Glad to see that the answers I've written for that article aren't
useless.
But someone else has to file this bug because I am am not expert
enough to
write it.
http://d.puremagic.com/issues/show_bug.cgi?id=3977
Gah, I knew I'd be too late :) Took me a while to find it.
Marked as a duplicate of
http://d.puremagic.com/issues/show_bug.cgi?id=2095
It seems this bug keeps getting rediscovered!
It's not really an easy problem to solve. With const, it sort of works,
but now all the objects are treated as const, whereas the thing you really
want to treat as const is the class references and array (head-const).
Imagine if you wanted to call a mutable method on each of the array
objects as defined by the base-class. Such an operation is not invalid.
I feel like we will eventually need to correctly solve these types of
problems. I think it could already be done using alias this for custom
types, but the builtins would need to be treated specially.
-Steve