Feel like everyone’s been telling me it’s the best thing since sliced bread. I’m just a hobbyist with like a single big project I’m maintaining but I’m starting to hate the code and idk maybe I should rewrite it in rust. Idk

  • Lucy :3@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    9 days ago

    If you either hate yourself, or somehow manage to forget C/C++, JavaScript, Python and probably some more random languages, then yes. Because Rust is basically just a confusing, illogical mix of all of that. Otherwise, as others pointed out, learn anything else that is - if that’s what you want - memory safe, statically typed, yadda yadda yadda, and has a good dependency system, compiler and syntax. Other languages could very well fit much better too, depending on available libraries and features in general.

    • Nibodhika@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      9 days ago

      While I agree with you that OP shouldn’t migrate to Rust, the language is not illogical nor a mix of any of those. There’s a lot of stuff that Rust does extremely well that can’t be reproduced in any of the other languages, such as Options or Result types. And while it can become confusing when lifetimes get thrown at it as a general rule it’s not. Also the compiler messages are so thorough, I don’t think I have ever seen anything come close to it.

      Rust is not for everything, nor for everyone, but saying it doesn’t have it’s merits is dishonest.

        • Nibodhika@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          7 days ago

          So I’ve heard, and AFAIK Rust has a lot of other similarities. That being said last time I tried to look at Haskell I gave up very quickly, It seems like a great language for mathematicians who want to code, but it’s a very different paradigm from what I’m used to, so I would need some time to dedicate to actually learning it properly. Plus, if the person I’m replying to thinks Rust is confusing he probably puts Haskell, Lisp and Brainfuck in the same category.