• ExperimentalGuy@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    One of the reasons i started learning rust was bc of how easy it is to get into it, or at least that’s how it felt for me. It wasn’t until a few months into consistently writing that I started to encounter things that I didn’t understand.

    • marcos@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      The good thing about Rust is that if you have no idea of any problem in your code, it very likely because your code is ok.

      On C++ things are different.

  • glad_cat@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Rust is nice, unless you have a traits compilation error from a 3rd party library using types that are more difficult to write than C++ templates.

    • philm@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      yeah as nice as it is what you can achieve with trait-bounds there are definitely trade-offs, being compile time and error messages, and sometimes mental complexity, understanding what the trait-bounds exactly mean… I really hope, that this area gets improvement on at least the error-messages and compile time (incremental cached type-checking via something like salsa)

    • corm@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Rust because having a package manager is important.

      Even C has a package manager

    • JakeHimself@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Tbf, you have to be pretty far with Rust to get to a point where Rust’s compiler errors stop helping you (at least, as far as I’ve seen). After that, it’s pretty much the same

      • philm@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        Yep use a little bit more deeply cascaded generic rust code with a lot of fancy trait-bounds and error messages will explode and be similar as C++ (though to be fair they are still likely way more helpful than C++ template based error messages). Really hope that the compiler/error devs will improve in this area

  • FreeloadingSponger@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    MySQL: you have an error near here.

    Me: What’s the error?

    MySQL: It’s near here.

    Me: You’re not going to tell me what the error is? Okay, near where? Here?

    MySQL: warmer… warmer…

    • marcos@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Oracle: You have this error in line 1

      User: Hey, no, there isn’t anything to cause this error in line 1

      Oracle: I’m telling you, it’s in line 1

      User: Hum… How many lines are in my 10 lines query?

      Oracle: 1

  • UFO@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Way too short to be a real C++ error. Needs a few more pages of template gibberish.

    • sunbeam60@lemmy.one
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Template<Instatiation::_1,_2,_3, Instatiation2::_1, _2<closure::wrapped<_1[map::closure_inner]>>, Outer<Inner<Wrapper<float>>>>::static_wrapper<std::map<auto>, spirit::parser::lever<int, std::array<int>>::fuck_you

  • CanadaPlus@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Haskell errors:

    Iä! Iä! Cthulhu (b -> (a -> c)) -> (b -> (c -> c)) -> a fhtagn! Ph’nglui mglw’nfah [[a]] Cthulhu R’lyeh wgah’nagl fhtagn!

    [45 lines of scopes]

    Once you understand the type system really well and know which 90% of the error information to discard it’s not so bad, I guess.