Object.toString, toHash, opCmp, opEquals

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Apr 26 00:49:58 UTC 2024


On 26/04/2024 11:06 AM, Walter Bright wrote:
> I recommend that everyone who has overloads of these functions, alter 
> them to have the `const` signatures. This will future-proof them against 
> any changes to Object's signatures.

We don't need to do this.

The solution that covers pretty much everyone needs is custom root classes.

Attributes, monitor field, reference counting, -betterC, all handled if 
we just let people define their own root class that they explicitly 
inherit from.

Right now language is far too coupled to druntime, and this is one area 
I want to see fixed. Too many issues crop up because it is too coupled.


More information about the Digitalmars-d mailing list