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

  • 1984
    link
    fedilink
    arrow-up
    18
    arrow-down
    3
    ·
    edit-2
    4 hours 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.

    • leisesprecher@feddit.org
      link
      fedilink
      arrow-up
      3
      ·
      10 hours ago

      It would be really great to have some “Python layer” on top of Rust.

      My current work is mostly data mangling web services (Java/Spring Boot) and there’s simply no way I could convince anyone (including myself) that Rust is a viable alternative in terms of development speed.

    • GBU_28@lemm.ee
      link
      fedilink
      English
      arrow-up
      11
      ·
      16 hours 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
        7
        ·
        15 hours ago

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

    • akkajdh999@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      16 hours ago

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

      If you only count mature languages. There’s a lot of small immature languages. For example Inko.

  • luluu@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    15 hours ago

    zig, kinda. You still have to manually manage memory, but for smaller applications there is e.g. the ArenaAllocator, which does everything for you. zig has a few nice features that make it just easier to manage memory. Keep in mind that it is not at release level and will change, but it’s already functional.

  • solrize@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    2
    ·
    edit-2
    15 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 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.

  • masterspace@lemmy.ca
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    1
    ·
    20 hours ago

    Pretty much all high level languages do because they’re already designed around automatic memory management.

    • Dhs92@programming.dev
      link
      fedilink
      arrow-up
      10
      ·
      19 hours ago

      Yeah, Rust is a special case because it handles almost everything at compile time. It also doesn’t rely on garbage collecting like the majority of modern high level languages.

  • Lojcs@lemm.ee
    link
    fedilink
    arrow-up
    23
    arrow-down
    1
    ·
    20 hours ago

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

  • Kyrgizion@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    18 hours ago

    I’d say Malbolge is pretty safe. I’d like to see someone crack a system using that.

    • UnfortunateShort@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      14 hours ago

      As someone who has used Python and Rust professionally, I’d say Python, while memory-safe, lacks proper type-checking. I don’t know if there are alternatives, but Pylance is straight up trash. Also Python’s performance doesn’t even compare to Rust. It’s a great scripting/programming language, but I think it’s use cases are vastly different.

      I’d say whether Python counts depends a lot on what you want to do. I have a very strong opinion on using Python for complex projects. When it comes to performance, it’s suitable as nothing more than glue-code.

  • Bear@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    3
    ·
    20 hours ago

    By popularity: Python, Java, JavaScript, TypeScript, SQL, C#, Go, HTML, Mathematica, PHP, Shell, Lua, SAS, Kotlin, Ruby, Dart, R, Swift, Scala, Matlab. The only popular languages lacking memory safety are C and C++.