change 'this' pointer for structs to reference type

Leandro Lucarella llucax at gmail.com
Wed Nov 5 04:12:18 PST 2008


Walter Bright, el  2 de noviembre a las 00:01 me escribiste:
> 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 saw you made some changes in phobos for this. But I think there is
a mistake in changeset 866[1]. I think the file trunk/phobos/std/string.d
was not supposed to be commited, because it moves back from onRangeError
to onArrayBoundsError, which was changed in the previous commit (and it's
totally unreleated to the *this -> this change =).

[1] http://www.dsource.org/projects/phobos/changeset/866

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Borrowing money from a friend is like having sex. It just completely changes
the relationship.
	-- George Constanza



More information about the Digitalmars-d mailing list