I know of one simple pointer instability issue that has not been fixed for 
years: <https://play.nim-lang.org/#ix=4e7m>

I am aware of that one so I avoid it. However, in my case I am iterating over 
ref object graphs and modifying their children, parents or even grandparents, 
so if the simplest pointer instability issues are ignored, it seems likely that 
there could be issues with this too.

Moreover, I am not messing with uninitialized memory at all.

I know that these issues do not affect most use cases, I probably just see them 
a lot because of the things I am working on.

Anyway, having had a moment to clear my head, I think I will ditch ref objects 
for indexes. It will be a bit of a hassle to refactor and will make the code a 
bit harder to read, but nim being as flexible as it is I think I might be able 
to come up with a decent solution.

Reply via email to