April 26
On 4/26/2024 11:28 AM, Per Nordlöw wrote:
> Shouldn't some or all of them be qualified as scope aswell?

I did think of that, but also figured if I can't get const, scope is dead in the water, too.
April 27
On Friday, 26 April 2024 at 08:43:46 UTC, Jonathan M Davis wrote:
> The ideal situation here is that none of these functions are on Object at all. They really aren't useful there, because it's not particularly useful or necessary to operate on Object. Some of the druntime code does, because it hasn't been templated yet, but once it has been, it won't need to operate on Object at all. At that point, we won't need to have any of these functions on Object, and Editions should give us the ability to remove them.

+1, this is the correct solution.

We've already had success templating the druntime opEquals lowering for classes [1]. We can and should do the same thing for the other Object methods.

[1] https://github.com/dlang/druntime/pull/3665
1 2 3 4
Next ›   Last »