9 ms·
I think the key is the following quote at the end of the article: > I find a bit of solace in the fact that implementing a data structure like this in a non-ga
by dbaupp 9y ago
I think the key is the following quote at the end of the article:
> I find a bit of solace in the fact that implementing a data structure like this in a non-garbage collected language without Rust is also quite tricky; you need to carefully keep track of when a node has no more references and can be freed
The main difference between Rust and most other non-garbage collected languages is when the trickiness occurs: for Rust, the compiler complains about problems a lot, while for other languages, the problems usually only manifest at runtime.
If you're doing something that requires a pointer soup and can't use garbage collection, the choice is between Rust with compile-time checks and C or C++ with (at best, by using the appropriate sanitizers) runtime checks.