change 'this' pointer for structs to reference type
dsimcha
dsimcha at yahoo.com
Sun Nov 2 06:57:32 PST 2008
== Quote from Walter Bright (newshound1 at digitalmars.com)'s article
> Andrei suggested this change, and I think it is a great idea. D ought to
> be moving away from pointers for routine work, and this would make a lot
> of sense.
> It would entail some changes to user code, mostly when dealing with the
> opCmp and opEquals member functions. The function signatures for them
> would be changed to opCmp(ref const S).
I'd say go for it. I wouldn't be at all worried at this point about things that
break code in trivial ways in the D2 branch. I write D2 code, and to me the
advantages of having a well-thought-out language without any strange artifacts
from the caveman era greatly outweigh the need to fix some trivially broken code
every few releases. On the other hand, I'd obviously be more conservative about
non-trivial changes that require redesign of parts of the code, now that D2 is
getting close.
More information about the Digitalmars-d
mailing list