Nim icon indicating copy to clipboard operation
Nim copied to clipboard

test moving object equality out of system, using macro

Open metagn opened this issue 1 year ago • 1 comments

refs https://github.com/nim-lang/RFCs/issues/475, refs #6676

Want to see how much this breaks, should have tried it sooner

metagn avatar Oct 03 '24 12:10 metagn

Well it works, but it's a bit late to tie this into nimPreviewSlimSystem and there's very little discussion about it. I copied the implementation straight from my comment on #6676, I'm not sure if it's up to date, derivative implementation is on skinsuit.

It would be nice if we could add the module by itself but it really only works if we also remove the original symbol from the system module. Maybe another flag than nimPreviewSlimSystem but having more than 1 preview flag could make things worse and hard to track, unless we give a proper timeframe for them, i.e. guarantee that nimPreviewObjectEquals is only made default strictly after nimPreviewSlimSystem is.

An alternative would be implementing https://github.com/nim-lang/RFCs/issues/367 but I figured this would kill two birds with one stone. (I also don't want to touch fields but tuple equality still needs it.)

metagn avatar Oct 06 '24 00:10 metagn