Why is `opequals` for objects not `@safe` by default?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Apr 5 16:15:15 UTC 2024


On 06/04/2024 5:02 AM, H. S. Teoh wrote:
> On Thu, Apr 04, 2024 at 11:56:05PM -0600, Jonathan M Davis via Digitalmars-d wrote:
> [...]
>> Ideally, Object wouldn't have functions like opEquals, and they'd only
>> be added by derived classes so that programs could put whatever
>> attributes on them make the most sense, but that's a breaking change,
>> so it hasn't happened.
> [...]
> 
> We've been talking about ProtoObject for years now. When will that
> materialize?
> 
> 
> T

Custom ``extern(D)`` class roots are on my list which could be a better 
solution. But yeah somebody needs to write the DIP.

D classes are just one more thing that ties the language to druntime, 
and I really want to see that relationship broken up.


More information about the Digitalmars-d mailing list