I think it’s time to remind everyone that Rust is the best programming language in the history of the world.

· · Web · 2 · 1 · 1

Then why am I still coding in C++ at work? 😭

Though C++ is also making strides in the same direction of Rust. C++20 is feature complete and I'm eager to use the powerful new features in my codebase:

@codewiz Did you miss the tags, or are they implied?

Rust is a better C++, but not every programming task needs the same approach, and therefore the same language ...

@yojimbo I'm starting to see that Rust already has the qualities to be a better Java and a better Go: it's safer, more expressive, and better performing than both of them.

It's also going to be a better JavaScript, in a sense, as WebAssembly continues to spread and offers frontend programmers a faster VM with smaller download sizes.

The only real handicap of Rust is being conceptually harder to learn than agile languages like Python and Go. I'm still struggling with lifetimes 😓

@codewiz "Better" in which ways? Obviously this is deliberately difficult to answer ...

Better in that the resulting executable artefacts are efficient?

Better in that the developer spends less time wrangling the language and more time solving their actual problems?

Better in that code and documentation flow together more easily, for long-term code maintenance?

@yojimbo Indeed, there are too many independent axes of comparison, and statements such as "Rust is better than X" must be taken as a subjective judgement. Yes, I was just being a little trollish, just to see if I could ignite yet another fun debate on language superiority :troll:

@yojimbo But here's the serious answer:

1. Rust improves upon all garbage collected languages by virtue of delivering even stronger memory safety (no null references!) while not paying any of the cost.

2. Rust improves upon most multithreaded languages by virtue of eliminating entire classes of threading bugs with move semantics and borrow checking enforced at compile-time.

3. Rust is arguably much simpler than C/C++, yet similarly expressive and similarly capable of system programming.

@yojimbo Rust also had some downsides, but they're slowly going away:

1. Hard to learn (but new books, friendly error messages and some language changes have improved things)

2. Slow compiler (but every release is getting a little faster... and debug builds are reasonably fast today)

3. Immature libraries (but the ecosystem is slowly stabilizing, and dependency resolution is more mature now)

4. Hard to hire Rust talent (big problem for employers, but also a good reason to learn Rust now!)

@codewiz I might not have much luck in poking the troll :trollface:​ because I don't have much invested in the outcome :-)

As a developer of small single-contributor projects, I tend to switch language based on whatever I want to achieve - sometimes it's "write something now" in which case I tend to go to python or perl; sometimes it's "I want to install this on a different computer" in which case the single static executable from things like Go is much more valuable.

I suspect that the benefits of Rust are in problem domains much larger than I'm usually dealing with.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!