3 ms·
Isn't Nim's niche closer to Go's than to Rust's? It has garbage collection, at least by default.
by duckerude 6y ago
Isn't Nim's niche closer to Go's than to Rust's? It has garbage collection, at least by default.
- davidkunz 6y agoI'm not an expert in Nim, so it would be great if others could jump in. But to my understanding, Nim's ORC "garbage collector" (I'd rather call it memory strategy) is very similar to Rust's approach, it's based on reference counting (RC). It can also handle cyclic references. See here for more details: https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...
- withoutboats2 6y agoIt is not at all like Rust; it is a garbage collection system based on reference counting, pretty similar to Swift. This is obscured by the documentation for each using similar terminology (like "move semantics" and "ownership") to refer to systems with different characteristics.
- davidkunz 6y agoThanks for clarification withoutboats2! It's really confusing as Nim's move semantics "feel" very similar to Rust's (except that Nim is more relaxed regarding "use after move" - it simply performs a copy). I'll need to learn a lot more about the different concepts.