Re:The biggest threat to Rust's sustainability
by edflsafoiewq on Friday March 19, 2021 @07:33AM
(#26512115)
If the desideratum is "I want a decently fast language that compiles to standalone binaries", which would be normal for CLI tools, then they certainly are in the running against each other. Having a runtime or a GC isn't that important of a consideration for most software I would think.
To me, the sentiment seems to be that Rust is explicitly tailored for code that cares about no runtime overhead. If you don't have those requirements, then don't use Rust.
This is why I reach for Go by default when writing CLI tools. You will get your job done faster, and it will be much easier to understand and maintain. You will be trading off many of the static guarantees that Rust gives, but it's worth it for CLI tools, most of the time.
If you are writing code with strict performance requirements, then consider Rust. Otherwise you'll likely be adding a whole bunch of complexity for not much gain, and your code will require much more cognitive overhead to understand and contribute to.
Re:The biggest threat to Rust's sustainability
by davidkunz on Friday March 19, 2021 @06:42AM
(#26511861)
I don't think we should dismiss these comments so eagerly. Take a look at Nim - it's fast, efficient and elegant without the huge syntax overhead of Rust.
Re:The biggest threat to Rust's sustainability
by duckerude on Friday March 19, 2021 @07:37AM
(#26512145)
Isn't Nim's niche closer to Go's than to Rust's? It has garbage collection, at least by default.
Re:The biggest threat to Rust's sustainability
by davidkunz on Friday March 19, 2021 @07:45AM
(#26512187)
I'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...
Re:The biggest threat to Rust's sustainability
by withoutboats2 on Friday March 19, 2021 @08:36AM
(#26512550)
It 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.
Re:The biggest threat to Rust's sustainability
by davidkunz on Friday March 19, 2021 @08:58AM
(#26512745)
Thanks 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.
Comparing a language with a fairly significant runtime and garbage collection to a language with basically no runtime and strict (albeit largely automated) compile-time memory management is comparing chalk and cheese. You might as well say "I tried C++ but ended up going with Python because it was quicker to code" -- of course it was!