Cannot compare object.opEquals is not nogc

Rufus Smith via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 31 11:44:56 PDT 2016


On Monday, 25 July 2016 at 12:24:53 UTC, Steven Schveighoffer 
wrote:
> On 7/23/16 5:44 PM, Rufus Smith wrote:
>> [...]
>
> Again, I want to stress that Object.opEquals has been around 
> since early D1 days, @nogc is only a few years old, it was not 
> a wrong decision. @nogc cannot be added without breaking code, 
> and even if you could, it's not correct for opEquals.
>
> The issue is one of design, Object should not define which 
> attributes are acceptable on all objects, that should be up to 
> the class designer. The solution is to deprecate and remove all 
> convenience functions from Object.
>
>> [...]
>
> This is an extreme solution for a minor problem.
>

Minor for you... not for everyone. Some people despise the GC and 
try to write nogc code. For them it is not extreme. It is extreme 
for you because you are on the other side. Please don't treat 
your side as the only side.



More information about the Digitalmars-d-learn mailing list