Runtime assistance coupled via the type system is fully as legitimate as GC. Your example with "up" pointers in a pointer-linked tree (or DAG) structure is very easily handled that way.
General graphs are, as I noted, better handled by decoupling ownership from connectivity, as is almost always quite easy.
> General graphs are, as I noted, better handled by decoupling ownership from connectivity, as is almost always quite easy.
Let me reiterate once again. Decopling of ownership from connectivity does not solve any correctness problems. Instead of "use-after-free" you get "use-of-object-in-some-random-state" which might be even worse, since no tooling like address sanitizer or Valgrind will help you.
> Runtime assistance coupled via the type system is fully as legitimate as GC. Your example with "up" pointers in a pointer-linked tree (or DAG) structure is very easily handled that way.
> Runtime assistance coupled via the type system is fully as legitimate as GC.
You do understand that this particular article is exactly about it? Runtime assistance comes at a cost, though. Actually very measurable if you for some reason want to get max performance. (atomic refcounting is expensive).
More generally, any memory management approach is fully legitimate, including fully manual a-la C. But rigorous refcounting in C++ and Rust comes at a very high cost, and to make it as useable as tracing GC you have to actually implement cycle detection which makes it even more costly. So people generally cheat, and for some sorts of performance-sensitive code, that makes a lot of sense.
There is zero value in refcounting for tree node lifetimes. DAGs, only sometimes. Graphs are rarely as general as textbooks usually imply, although it is easy to find (e.g. geographical) examples that are.
Fully manual memory management has been demonstrated not to be legitimate, for reasons well covered already. It is just the only choice in weak languages.
General graphs are, as I noted, better handled by decoupling ownership from connectivity, as is almost always quite easy.