3 ms·
Yeah, some of the nice things about Rust aren't immediately obvious. Professionally, I use Rust for a few specific things: 1. Rust is surprisingly great for ma
by ekidd 7y ago
Yeah, some of the nice things about Rust aren't immediately obvious. Professionally, I use Rust for a few specific things:
1. Rust is surprisingly great for making cross-platform CLI tools and shipping static Linux binaries. Everybody can just install a single executable and they're ready to go. (Go is good at this, too.)
2. Rust is great for anything where I ask, "How big a cluster do we need for this?" I get roughly the same speed as C++, except there are far fewer footguns. And I can add threading support to existing code in an afternoon, and I can expect it to just work.
3. Rust's very new async support is powerful in some very interesting ways, and I have a couple of programs that it has worked beautifully for. (I'm working on an upcoming open source release of one of them.)
4. Rust's algebraic data types (aka "enum" and checked "match") are a joy for any software involving lots of special cases and complex logic. I think every typed, high-level language should steal this feature.
However, I have mixed experience using Rust for business logic. Yes, item (4) above does help with business logic. But business logic changes a lot, and it needs to be accessible to many developers within an organization.
So on my recent team projects, Rust often winds up doing the heavily lifting. But the rapidly-changing business logic will often get deferred to a GCed language. So far, this is working nicely.
- sammorrowdrums 7y agoFrom my experience it's quite a good language for fun experiments and coding challenges, at the very least. I grew to love it quickly during advent of code. The iterators, enums and no Null types lend themselves to interesting solutions. The crate ecosystem is also developing fast, and there are decent browsable docs and bootstrapping the env and development environment are all easy. SDL2 support makes it really easy to make rectangle based games like classic pong and experiment with keyboard and controller inputs etc. (never mind further possibilities of 3D etc). TTY apps and games are also easy to make with the termion crate. I think it's just kind of worth learning in a way that (for example) Python, C and Haskell are complementary options for learning different ways of thinking about of coding. Rust feels like a different flavour of programming. It's borrow checker and branch checking etc. they really are likely to lead to better programming in other languages too. Understanding ownership and considering the transfer of ownership are valuable.