• 𝕙𝕖𝕝𝕡
    link
    fedilink
    English
    arrow-up
    19
    ·
    1 year ago

    One big reason Nim never really caught on is because we’ve got lots of fast-ish languages with garbage collection (like Go, which sucks a lot of oxygen away from Nim IMO). Rust introduced a new concept to the mainstream that lets you program safely without a runtime hit for garbage collection.

      • 𝕙𝕖𝕝𝕡
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        To my knowledge, Ada doesn’t have an equivalent to Rust’s borrow checker. I also think I covered that base by specifying “mainstream” 😀

        • solrize
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          There is a proposal for borrow checking in SPARK, borrowed (as it were) from Rust: https://arxiv.org/abs/1710.07047

          As a more general matter, borrow checking is only relevant if you’re using dynamic memory allocation and deallocation extensively. There are programs where that is needed and at the same time you don’t want GC, but I think of those as niche areas.

          In Ada you tend to not use dynamic allocation or pointers much. It supplies some alternatives that are perhaps not quite as flexible. For some more info, see this HN comment.

          The most safety critical programs of course usually don’t use dynamic allocation at all, since they can’t risk running out of memory.