• tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Rust and Haskell are the only ones that have not yet made me scream at my PC

    As someone who likes Rust and uses it every day, how have you never screamed at your PC as a direct result of the borrow checker or trait solver? Have you never encountered errors such as higher-ranked lifetime error: failed to prove $FOO: Send, which is sometimes actually just a bug in the compiler? Or the classic the trait bound $FOO: $BAR is not satisfied. axum even has a #[debug_handler] macro just to improve this error. I have spent literal days of my life fixing these kinds of errors, when the compiler not only doesn’t provide a solution but fails to pinpoint the cause of the problem.

    I can only hope diagnostics continue to improve, because I know they matter to the Rust team.

    • soulsource@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I have seen some errors along those lines (but not exactly those) while working on the Free Monads proof of concept. Especially while trying to come up with a solution that doesn’t require macros (which I didn’t manage in Stable Rust, exactly due to such issues).

      I have yet to see them in actual production code though, but maybe I was just lucky up to now?