Live data from Hacker News

Rust Is Hard, Or: The Misery of Mainstream Programming

hirrolot.github.io

1–10 of 811 posts

Re: Rust Is Hard, Or: The Misery of Mainstream Programming

#6
post #3

Rust isn't hard. Programming is hard. Rust just points out failure states before you encounter them in production.

All type systems will have meaningful and true propositions which are apparent to the programmer but not yet to the language team. Choosing a typed language is choosing to have a relationship with a living & evolving team/ecosystem, one which can improve over time in their ability to express and prove propositions or provide ergonomic abstractions.

Some of what the author is complaining about matches my conversations with people who aspire to be Rust library authors — that you're often trying to hijack the type system because you actually know better.

Re: Rust Is Hard, Or: The Misery of Mainstream Programming

#8
I've been programming in Rust for the last few years. My daily work is mostly just fumbling through compiler errors until the code works.

Some observations:

- The compiler is always right.

- Do what clippy and rust-analyzer says. Don't ask questions.

- If you're fighting the compiler, clippy, AND rust-analyzer, then you're almost definitely wrong.

Virgins try to use &str everywhere. Chads just use String.

Re: Rust Is Hard, Or: The Misery of Mainstream Programming

#9
post #3

Rust isn't hard. Programming is hard. Rust just points out failure states before you encounter them in production.

I enjoy Rust, but it's not that simple. It really is more work to accomplish certain tasks in Rust than many other languages even when what you're doing is safe.

The narrative that "Rust isn't hard" is getting tiresome, and I say this as someone who writes a lot of Rust. Let's be honest that Rust can be harder than many other programming languages in many ways, but those of us who use it believe the upsides and tradeoffs are worth the minor to moderate increase in difficulty.

Pretending Rust is easy just sets beginners up for disappointment when they get into Rust and realize it wasn't what they were sold. Or worse, they start doubting themselves when they encounter the hard parts because Rust fans were busy insisting it's all easy.

Re: Rust Is Hard, Or: The Misery of Mainstream Programming

#10
I wish there was a Rust-like programming language that was just a little bit higher level than Rust. I like Rust's wide ecosystem with high quality packages, the nice type system, traits, the idea that my code generally runs pretty fast even if I'm being lazy about writing good code, and my code usually working correctly if it compiles.

I care about speed and correctness but Rust makes me also care about ownership and lifetimes even when I don't really want to care about that stuff. I've written Rust for years now and this still occasionally can really slow me down. Rust is still a very nice language so I just deal with it :) no pain no gain.

I would love a Rust-with-GC or something in that spirit that is similar to Rust but automatically figures out lifetimes as much as possible and GCs whatever it cannot figure out automatically. I've looked at languages like Nim and read about research languages like Koka so I'm optimistic something will emerge from this space I really like.

Post reply on HN