Re:Nim 2.0 thoughts
by forgotpwd16 on Saturday May 15, 2021 @03:04PM
(#27167932)
It may be better than Go but I don't see how it is comparable to Rust. Rust's biggest selling point is compilation-checked memory and thread safety guarantee without garbage collection. Nim instead uses a garbage collector, or a reference counter similar (but deterministic) to Swift which can cause memory leaks, or manual memory management.
[ Parent
| on HN ]
Nim is getting very close to Rust in terms of safety (but without the verbose ownership management)
https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...
Re:Nim 2.0 thoughts
by searealist on Saturday May 15, 2021 @07:49PM
(#27169989)
Memory safety with GC is easy. Rust is novel because it offers memory safety without GC. Your links mention GC.
Can Rust deal with linked lists as well? Nim has a cycle collector based on the trial deletion algorithm https://researcher.watson.ibm.com/researcher/files/us-bacon/... It's different than the usual GC algorithms.
It was discussed recently: https://forum.nim-lang.org/t/7905
> to Swift which can cause memory leaks
The Nim compiler can detect cycles and warn you. And --gc:orc collects them successfully at runtime. Orc is going to be the default.