Making `object.opEquals' replaceable

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Fri May 8 16:09:17 PDT 2015


On Fri, 08 May 2015 16:59:59 +0000, Manfred Nowak wrote:

> Jonathan M Davis wrote:
> 
>> And why not just use another function instead of opEquals for what you
>> want?
> 
> Because the local `opEquals' _is_ the overload-function for `==' and
> `!='.
> 
> I guess that your "another function"-opinion holds for every form of
> overloading.
> 
> -manfred

i'd be VERY surprised if `==` or `!=` does any mutation. and i (like most 
programmers) don't like such surprises in code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150508/061d979f/attachment.sig>


More information about the Digitalmars-d mailing list