4
jestdotty
40d

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?!

Comments
  • 1
    Rust isn’t obsessed about errors.
    It’s obsessed about presenting them to you before they get deployed to prod, unnoticed.
  • 1
    "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
  • 1
    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
Add Comment