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
-
Lensflare1709511dRust isn’t obsessed about errors.
It’s obsessed about presenting them to you before they get deployed to prod, unnoticed. -
devRancid63110d"But Result and ? operator are so much better than errors!!!1!1!!1"
Except it gives you 0 context information or traces so gl figuring out why tf it failed
The compiler can't prevent that either
Rusts genius solution: make your code look like shit by checking/logging everywhere or install a third party package that fixes its shortcomings -
I was put off by rust after watching a stream (possibly theprimagen) where some rust dev was hacking along at speed and then had to stop after calling a function, saying something like ”oh, now I’m forced to explicitly handle potential errors from this call. Feels unnecessary. I wish it throw an error that was handled by some global/parent error handler, as you would in other langs like …JS”
No idea if that is accurate but sounded annoying as hell
Related Rants
for a language obsessed about errors, rust sure sucks at its stacktraces so I can know what gave the error
like finding a needle in a haystack. well fuck if I know what throws this thing. all things I know that can make this error type should be self-contained -- so where you getting this error from?!
rant
error
rust