Assume mainstream adoption as used by around 7% of all github projects

Personally, I’d like to see Nim get that growth.

  • caret@lemmy.zip
    link
    fedilink
    arrow-up
    30
    arrow-down
    5
    ·
    1 year ago

    Rust! Memory leak free code would make our world a better place!

        • philm@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Not without a super fancy type system that has to be still found. I think the key issue is cyclic data-structures (e.g. doubly-linked list). The language somehow needs to have strong/weak pointers and automatically determining them is a very complex research question…

      • Rin@lemm.ee
        link
        fedilink
        arrow-up
        3
        arrow-down
        2
        ·
        1 year ago

        Help me understand your point of view. How does Rust not prevent memory leaks?

          • hairyballs@programming.dev
            link
            fedilink
            arrow-up
            9
            ·
            1 year ago

            And here you’re only talking about a subset of memory leaks, by inaccessible memory. You can also leak memory by pushing new elements in a channel while never reading them for example.

          • zygo_histo_morpheus@programming.dev
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            1 year ago

            You are absolutely correct that rusts safety features don’t extend to memory leaks, but it’s still better than most garbage collected languages unless you abuse Rc or something, and it does give you quite fine-grained controll over lifetimes, copying and allocations on the heap which in practice means that rust is fairly good about memory leakages compared to most languages.

    • philm@programming.dev
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      edit-2
      1 year ago

      At this point, I think it’s almost mainstream, and it’s still growing fast (and it’s getting better, rust-analyzer is really awesome these days, I was there at the beginning, no comparison to today…))

      I may be biased, but I think it’ll be the next big main language probably leaving other very popular ones behind it in the coming decade (Entry barrier and ease of use got much better over the last couple years, and the future sounds exciting with stuff like this)