top | item 33714049

(no title)

SevenNation | 3 years ago

> With Rust, though, one needs to learn entirely new ideas — things like lifetimes, ownership, and the borrow checker.

Those three things are actually just different facets of the same thing: ownership. The bad news is that you must learn Rust's ownership model to use Rust idiomatically. The good news is that you can do a lot without learning Rust ownership model at all. Just clone all your values. Not advisable for production code, but great for getting over the ownership model hump.

discuss

order

jeffparsons|3 years ago

And once you've learnt those things and got some experience writing real world software in Rust, you may well find yourself more productive in Rust than, say Ruby on Rails.

Context matters a lot, and you shouldn't be making tech choices based on the way the wind is blowing ("tech radars", what's hot in the blogosphere, etc.). If hiring teams to work on your mostly-CRUD app easily is a high priority, then Rust probably isn't a good choice. If you have a team that already knows Rust, and you need to add some web app / service, then Rust is a perfectly fine choice, on the grounds that support for web stuff is "good enough" now, and the best tool for the job is often the one you already know well and are already supporting.

If I'm building stuff for _myself_ and it's getting too fiddly for a bash script, then I'll always default to Rust just because _personally_ I'm way more productive in it than anything else.

Context, context, context.

charcircuit|3 years ago

And it's not an entirely new idea. C++ has ownership too.

arcticbull|3 years ago

C++ doesn't have a Rust-like ownership/borrow system.

zozbot234|3 years ago

> Not advisable for production code

If your alternative is Python or Ruby, then cloning your values is perfectly OK for production code. It will still run very fast.