Shar: One year with Rust
reddit.com
reddit.com
I am looking at picking up a new language. Something to add to the utility belt and not just for fun(so no lisp...). I am torn between go and rust. They seem similar yet coming from different backgrounds.
go is designed by a big company with a need for a safe systems language that is as fast as C that works well at scale with a distributed infrastructure. Rust is designed by a company with a need for a safe systems language that works well to build browsers? I like Mozilla's tech usually but go seems to have better recognition in the workplace. Any thoughts?
1. Zero cost abstractions, namely the ownership system - No GC by default, provides memory safety without the overhead but at the cost of a higher learning curve.
2. Higher-level language features like FP, inheritance, and generics that optimize away to machine code that's equal to or faster than the equivalent C version.
3. Cargo / crates package management. You just include any external library you need in your Config.toml file and cargo takes care of the rest.
4. Best of both worlds type system - about as strongly typed as Haskell but type inference takes care of the tedium of having to annotate the type of every variable like C / java style giving the killer feature of "if it compiles it's basically bug free".