• SamC@lemmy.nz
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      Every language starts out as beautiful, then it becomes popular, a whole lot of new features get wedged into it, and everyone who’s watched a 5 minute tutorial video starts coding in it.

      I remember the days when Python, Java and even Perl were considered beautiful.

    • prowlr
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Too true, python can be beautiful and succinct or like a huge plate of spaghetti cut up with scissors

  • kia@lemmy.ca
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    1 year ago

    Once you get used to the Rust syntax, it actually makes the code look cleaner.

    • dragnucs
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Ans you also learn to format it properly.

      Generally any new santax looks ugly. Then when you understand why it is written like it is it starts looking good.

  • 𝕙𝕖𝕝𝕡
    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.

  • loops
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    1 year ago

    deleted by creator

    • pollocks
      link
      fedilink
      arrow-up
      31
      ·
      1 year ago

      The third one is rust which has become a meme at this point. Programmers like it because it has almost as much performance as C but has a lot of safeguards preventing memory errors and vulnerabilities. I have no idea what the last one is tho

          • Double_A@discuss.tchncs.de
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            The crab is public domain, so you can use it to advertise your own Rust project or whatever. The gear logo belongs to the Rust foundation, which sparked some controversy a while ago.

        • CanadaPlus@lemmy.sdf.org
          link
          fedilink
          arrow-up
          17
          ·
          1 year ago

          I’m pretty skeptical it could be as fast and safe as Rust without the added challenge. Like, even doing what Rust did was a big deal.

          • mundane_party@lemmy.world
            link
            fedilink
            arrow-up
            5
            ·
            1 year ago

            I could be wrong, but based on the Wikipedia article it seems like it’s more trying to be a python replacement than a rust/c++/Java/etc replacement. The big thing with rust is that it’s rules allow memory safety without a garbage collector, while unless I missed something it seems like nim just uses a garbage collector. Not that that’s necessarily some huge problem or anything, but you know, different purposes

            • CanadaPlus@lemmy.sdf.org
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              So basically, what I’m hearing is that it’s not fast like Rust. Yup, that tracks, this is just a guy stanning his favourite.

          • potatoBoy@programming.dev
            link
            fedilink
            Afaraf
            arrow-up
            1
            ·
            1 year ago

            Can compile to C which then compiles using your favourite compiler. So it can operate at the speed of C

            And the new memory management system is similar to rusts system (and can be fully disabled if you want manual memory management)

            • CanadaPlus@lemmy.sdf.org
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              1 year ago

              Can compile to C which then compiles using your favourite compiler. So it can operate at the speed of C

              Technically, it all compiles to assembly, but Python is still a lot slower than C or Rust. Speed is lost along the way through those layers of abstraction.

              And the new memory management system is similar to rusts system (and can be fully disabled if you want manual memory management)

              So it doesn’t have a garbage collector? I’m going to have to actually look into this myself.

          • qaz@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            arrow-down
            1
            ·
            1 year ago

            I think it transpiles to C so theoretically it could be quite fast, but I doubt the generated C is as fast as manually written C or Rust.