Title. I’m looking for a concrete answer for this.

  • RagingHungryPanda@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 day ago

    This never became a real language, but years ago Microsoft Research work on Project Midori, an attempt to make a managed programming language suitable for an operating, and the operating system to go with it. It was based off of C# and heavily modified. Joe Duffy at Microsoft Research wrote some good blogs on it, about approaches they took and why, problems they ran in to, etc.

    https://joeduffyblog.com/2015/11/03/blogging-about-midori/

  • 1984@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 day ago

    None of the languages give the same runtime guarantees as Rust without having a garbage collector.

    I think people in this thread are putting Rust in the same bucket as garbage-collecting languages, but there is a performance cost to garbage collecting. Rust doesn’t have a garbage collector and this is why Rust is very fast and still can guarantee a lot of runtime errors won’t happen (unlike in C, c++ etc).

    But it’s really complicated to write code in Rust. Not the basic code but if you have lifetimes on things or use async code and want to change it, you may have to spend hours reworking your entire program.

    • GBU_28@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Agree. I get very grumpy refactoring async rust. It’s the only time at the point in my career that I think “what the fuck I don’t know anything about anything I think I’m a lizard”

      • sbv@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        Async Rust has a long way to go. Eventually someone will figure out a decent abstraction. That’ll be good.

  • solrize@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    20 hours ago

    If you have to ask this question you should probably be using a garbage collected language. Manual memory management is quite tedious and it’s easy to make mistakes. Rust’s novel contribution is reliably catching the mistakes at compile time so once you have fixed all the compile time error messages you have a safe program. But it doesn’t ease the tedium that much.

    GC does it automatically and is way more convenient, but inflicts a cost in runtime performance. That’s almost always fine on today’s computers, thus Python’s popularity. Rust is best for systems work where you need more precise control of machine resources. It is probably used more than necessary right now, because it’s new and exciting and programmers like that.

    The safest language is probably Ada but it is less flexible than Rust. They are working on extending it to be comparable. Right now Ada isn’t well suited for programs that do lots of runtime allocation.

  • Lojcs@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    2 days ago

    Almost every language does, do they not? Rust is special because it is safe and as fast as cpp