From a language architecture standpoint and not an ecosystem standpoint, what might be some things where you’d really not want to use Rust, either because of some limitation that prevents it from doing it or just because it’d be massively annoying to write to the point of significantly reduced productivity? What about Rust makes it unsuitable, and what language paradigms are the best for it?

I hear a lot about how the things that Rust is not good for, JIT compilation with a garbage collector is usually the best solution, and vice versa. How true is this?

    • @pinknoise
      link
      6
      edit-2
      2 years ago

      Option is rust’s null. And matches are everywhere because of it.

      And if let’s - so what?

      C++ makes working with null pointers so beautiful.

      How? You still have to check wether it’s NULL or not.

      Businesses want reliable software

      No they want quick turnaround, so they can make more profit. Thats the opposite of reliable software. Thats why most commercial software is such a buggy mess.

      • @southerntofu
        link
        32 years ago

        How? You still have to check wether it’s NULL or not.

        I think that’s the parent’s point: in C/C++ you don’t have to deal with null. You can just pass it around and potentially start unintended/undefined behavior. While in Rust, it’s a compile-time error if you don’t unwrap the option somehow (eg. if let Some(content) = optional_content).

        So yes it’s more concise and “beautiful”, but you’ll probably bite your own hand at some point playing this game

        • @pinknoise
          link
          32 years ago

          How is it more beautiful? You have to deal with null pointers when you want to use the pointer anyway, if you don’t you will get a runtime error, or worse, your program will keep running in an unintended state.

          • @southerntofu
            link
            22 years ago

            yes, that was exactly my point. You can just use a pointer without checking it, which is aesthetically more pleasing, but will produce garbage :)

    • Ephera
      link
      32 years ago

      I mean, for what it’s worth, my own definition of ‘beautiful code’ includes the properties “reliable” and “human-readable/-writable”. I do not like clever code or code that hides errors away.

      I do work in a company, not in academia, but even for my personal projects, that’s my goal. It’s just a necessity when you want to collaborate with others or your future self.