Per this thread http://forum.dlang.org/post/[email protected] , it was decided to try and go the path of removing opEquals, opCmp, toHash, and toString from Object, as they don't need to be there, and the fact that they're there is causing issues with attributes such as const ( issue# 1824 ).
This issue is specifically for toString so that any work towards making it unnecessary and removing it can be referenced here, whereas the other 3 have separate bugzilla entries, as the work for them isn't necessarily related to each other. opEquals, opCmp, and toHash in particular may require substantial work to be done on the built-in AAs before they can actually be removed from Object, as the AA implementation is not currently templated like it should be.
Relevant discussion on how to transition away from having these functions on Object (the thread got broken up a bit - probably by the mailman bug):
http://forum.dlang.org/post/[email protected]http://forum.dlang.org/post/[email protected]
The key suggestion is to change the compiler so that those 4 functions can be free functions in object_.d, similar to how the compiler already does special stuff for == rather than simply calling Object's opEquals.
Comment #3 by robert.schadek — 2024-12-07T13:32:31Z