Hi,
On 23/11/21 17:17, Zebediah Figura wrote:
But are there cases in which it is necessary to _not_ remove the replaced node? Because if there aren't, I would just always remove it as it happens now, which seems to me the simplest solution.
Patches 3 and 4 in this series reuse the replaced node. It's not *necessary* to do that, but it works, and saves the trouble of allocating a new one. I'm not opposed if there's a consensus of "don't do that", though.
As I said in another subthread, I think that deleting the old cast node and re-creating it would make the code more readable, therefore would be preferable. But I can live with your solution.
Giovanni.