News for hackers. Stuff that matters.
Re:Rust Is Hard, Or: The Misery of Mainstream Programming by PragmaticPulp on Thursday June 02, 2022 @07:56PM (#31602202)
> To be clear: using async is fine if you know what you are doing, and it can provide incredible performance. But if you do, keep it simple: avoid lifetimes and most importantly: don't attempt advanced trait shenanigans - if you do need traits, just returned BoxFutures without lifetimes, throw in lots of Arc<Mutex<_>>, clone() and call it a day.

It seems like everyone doing async Rust goes through a long journey before arriving at this conclusion. Once you know the pitfalls you can navigate around them, but I hit a lot of dead ends along the way.

Re:Rust Is Hard, Or: The Misery of Mainstream Programming by lumost on Thursday June 02, 2022 @08:24PM (#31602441)
Anecdotally, this is the pain felt most across the entire rust language. There are more ways not to do something than to do something. This makes it hard for beginners to pickup, and difficult for projects to scale on.
Re:Rust Is Hard, Or: The Misery of Mainstream Programming by crabbygrabby on Thursday June 02, 2022 @09:22PM (#31603056)
I've heard people complain about languages having too many ways to do one thing. Never have I heard the opposite complaint hahaha. You can't please everyone.
Re:Rust Is Hard, Or: The Misery of Mainstream Programming by yencabulator on Friday June 03, 2022 @11:31AM (#31609693)
That by itself can be interpreted as a good thing -- no Perl TMTOWTDI please.

The "special quality" about Rust that hurts here is that it takes a lot of time going into a dead end before you realize it's a dead end.