• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 day ago

    Runtimes/“VMs” like the JVM also allow nice things like stack traces. I don’t know about the author but I much prefer looking at a stack trace over “segmentation fault (core dumped)”. Having a runtime opens new possibilities for concurrency and parallelism too.

    Rust has stacktraces without needing a runtime. Don’t ask me what exactly is going on behind the scenes, but there is a way to request a stacktrace for a given point in the program. And unless you’re doing embedded stuff, a stacktrace is automatically generated for errors.

    And as for concurrency/parallelism, it’s correct what you wrote, but I just wanted to point out that it doesn’t have to be a language runtime. Using Rust as an example again, you typically spawn the Tokio async runtime on program start, if you’re gonna do async/await stuff.