11 votes

Learning Rust can be frustrating because it's different enough from other languages that you may not even be able to easily describe the issues you're having

6 comments

  1. Akir
    Link
    I don't mean to be critical, but yeah, if you're getting a bunch of these type-related errors, you really should go back to the documentation. The Rust Manual is really well written because it has...

    Your best bet is pretty much the Rust compiler itself, and its diagnostics. That, or, biting the bullet and accepting that you'll have to go back and read some more beginner-level material before you can come back to what it is you were trying to do, and have an "ahAH!" moment.

    I don't mean to be critical, but yeah, if you're getting a bunch of these type-related errors, you really should go back to the documentation. The Rust Manual is really well written because it has to be. It messes with the fundamentals you already take for granted. You can't just pick up Rust and begin to fly with it.

    5 votes
  2. [3]
    krg
    Link
    As someone learning Rust, this is definitely a feeling that resonates with me. I don't mind being yelled at by the borrow checker, though. It's forcing me to think in a more strict way from the...

    I know what I want. Now I just need to... make it happen.

    As someone learning Rust, this is definitely a feeling that resonates with me. I don't mind being yelled at by the borrow checker, though. It's forcing me to think in a more strict way from the get-go (as someone who started by learning programming in strongly-typed languages). Still, makes seemingly simple algorithms difficult to implement. Yea, it really wants you to write robust programs from the start, adding to the friction. Ultimately, though, I think it'll force one to become a better engineer if they want to be successful in the language..which sucks at the beginning, but probably worth it in the end.

    4 votes
    1. [2]
      teaearlgraycold
      Link Parent
      It also feels very rewarding once you can finally write code that passes the borrow checker on the first try.

      It also feels very rewarding once you can finally write code that passes the borrow checker on the first try.

      3 votes
      1. krg
        Link Parent
        Ha, yea! It is so damn satisfying to compile a program without borrow-checking or type errors. Makes the program feel more correct than something similar done in Javascript, Python, or even plain...

        Ha, yea! It is so damn satisfying to compile a program without borrow-checking or type errors. Makes the program feel more correct than something similar done in Javascript, Python, or even plain Java.

        2 votes
  3. [2]
    SkewedSideburn
    Link
    For me the only reason to try Rust was always making GUI programs. And gtk-rs in my experience is not pleasant to work with, it feels like it's more broken than gotk3 for Go, even though it's...

    For me the only reason to try Rust was always making GUI programs. And gtk-rs in my experience is not pleasant to work with, it feels like it's more broken than gotk3 for Go, even though it's listed as official. I'm spoiled, I can't work if my IDE shows me errors but the code compiles, and in this case VS Code and CLion with Rust plugin showed completely different errors on the example code.

    I've tried it two years ago, and managed to write something. I've tried it a year ago and it somehow became a little worse. I'll try again next year, or whenever JetBrains releases full blown Rust IDE

    1. Wulfsta
      Link Parent
      As I recall, Rust is a bit lacking in it's GUI libraries. This is so much the case that the team behind Xi chose to use Swift as a frontend, rather than Rust - though they did start work on druid....

      As I recall, Rust is a bit lacking in it's GUI libraries. This is so much the case that the team behind Xi chose to use Swift as a frontend, rather than Rust - though they did start work on druid. There is a decent resource for the current state of things here.

      Admittedly I have no comments to help with your experience finding an IDE, I use neovim with some autocompletion and language server plugins myself.

      1 vote