ProtoObject and comparison for equality and ordering

Jacob Carlborg doob at me.com
Wed May 15 09:54:15 UTC 2019


On 2019-05-15 04:09, Andrei Alexandrescu wrote:

> In this case, ProtoObject is a carefully considered addition that 
> bypasses a malfunctioning artery - the Object class. But it doesn't 
> change or remove it, because there's much live tissue connected to it. 
> Changing how opCmp works - inserting a little botox during the surgery - 
> is a damaging distraction.

It will cause issues with code that does `is(T : Object)` and expect 
that to be the root class. In other cases the same code has been used to 
identify D classes before `__traits(getLinkage)` was available for classes.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list