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?

  • kyleisguilty
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    3 years ago

    warning: very confusing comment, this is a complicated topic

    Rust, in a vacuum, can do anything basically perfectly (yes, even unsafe code, at least it’s clearly marked as so). However, the vast majority of people aren’t writing rust in a vacuum, they are using the “rust ecosystem”, and, for better or worse, the “rust ecosystem” is mainly useful for two things: making back-end servers and standalone libraries (look into rust’s history and you’ll see why)

    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?

    JIT compilation is good for embedded programming languages, rust isn’t one so they don’t support it (although JIT compilation is a very complex topic, especially when talking about use cases)

    Garbage collecting is a simple way to ensure memory safety without the whole complex memory layout of rust, rust doesn’t have it because it does not need it

    Programming languages are just tools, use the right one for the job.