Setting two nodes equal to each other causes changes in one node to be visible in the other. Idents are also only bound once and visible across all the nodes.
However the equality operator acts like a value type equality operator. This is good default behaviour but an operator or function that tests for ref equivalence should be provided as well.
I could see it being useful for debugging purposes and it would make it more obvious to those new to nim that NimNodes act similarly to ref types in this way.
system.`=`(a, b)
should work
NimNode are ref types with an overloaded = proc.
It does. I'm surprised I didn't try that before. Thanks.
I assumed based on how NimNodes were implemented that the == operator was completely overwritten.