Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
There's programming languages that everyone could use to make job done quickly and there's that user needs to fully understand to use properly.
-
Responding to a few points:
* Capturing stack traces is very expensive to do for every constructed error value, which are used for lots of things besides "bubble error up". Though nothing is stopping you from using anyhow or other crates which capture stack traces for their error types
* Early returns work just fine, and ifs are just expressions
* Sync and Async are not comparable in the least. Async functions/blocks construct a stackless state machine of all state needed between await points across all futures so that you can run a future with one perfectly sized allocation (or no allocation at all on embeded!)
* You sure can have Options/Results both inside and outside of futures. Future<Result<Foo, Err>> are fallible futures and Option<Future<Foo>> is perfectly valid too
Though I'm not surprised you are so frustrated considering you started learning Rust with async, which is arguably one of the hardest parts of the language and definitely not something for beginners -
@retoor Rust does have backtraces, even pretty cool lazy backtraces which are quite a bit faster! Just not by default for every Result::Err value
-
@retoor Fair enough :D
It's always a compromise between user friendliness and expressive power -
@jestdotty Yeah async is pretty tricky in Rust and not necessarily the most beautiful thing, but it is efficient
Wrapping errors could be done with your own (or a crates) extension method on Option/Result which is async aware. Should be like 10 lines of code, not much but still annoying it's not in the standard library
Stack traces can be gotten easily by using one of the many error libraries. Though I'm still not sure myself which one is best -
@retoor I'll write standard string and math libs if or when you make it available.
Related Rants
-
Milenchy46
Why are the fastest laptops always considered "gaming" laptops and look like fucking alien spaceships? 😩
T... -
leanrob10Sometime I’m developing in Rust and I do something wrong. Then I look at the terminal and it says... “Yo... -
Chippy1"I'm not ugly. I just reduce my graphics to have better performance."

rust is just ugly
rant
ugly
rust