5 ms·
Shar: One year with Rust
- scorpioxy 10y agoIt's interesting to read about users of Rust trying to build different kinds of systems. The "amazing language for game development" is quite an endorsement. Even more so when you read that his colleague was able to pick up the language and contribute with no hassle. Unfortunately libraries and bindings will take time to develop so any new-ish platform will have the same issue. 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?
- oldsj 10y agoI'm neither OP nor an expert, but I highly recommend rust. It's got a few great features that put it higher on my list than go 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".
- galangalalgol 10y agoGo is only memory safe, not data/resource-race safe across threads like rust. That is an important consideration. Go is not as fast as c. Go is not even as fast as rust. Especially in cases that do a lot of memory allocations. Go is easier to write and compiles much faster. That matters. Dropbox used go and then replaced the parts that didn't run fast enough with rust. So you don't have to do either or.
- akmittal 10y agoI'm in same dilemma, Go is more mature/easy for web/network stuff. Rust seems like more of a complete language. For now I'm going for Go because I'm focusing on web backends.