• z3rOR0ne@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    I’m a beginner in both (heavily leaning towards putting more time into learning Rust though). Could you please elaborate a bit?

    • Ananace@lemmy.ananace.dev
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      Go has a heavy focus on simplicity and ease-of-use by hiding away complexity through abstractions, something that makes it an excellent language for getting to the minimum-viable-product point. Which I definitely applaud it for, it can be a true joy to code an initial implementation in it.

      The issue with hiding complexity like such is when you reach the limit of the provided abstractions, something that will inevitably happen when your project reaches a certain size. For many languages (like C/C++, Ruby, Python, etc) there’s an option to - at that point - skip the abstractions and instead code directly against the underlying layers, but Go doesn’t actually have that option.
      One result of this is that many enterprise-sized Go projects have had to - in pure desperation - hire the people who designed Go in the first place, just to get the necessary expertice to be able to continue development.

      Here’s one example in the form of a blog - with some examples of where hidden complexity can cause issues in the longer term; https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-ride

    • Ethan@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      6 months ago

      Ananace and the article they linked are using their dislike of Go to conclude that it’s a bad language*. It is not a bad language. Every language has hidden complexity and foot guns. They don’t like Go. Maybe you won’t like Go. That’s ok. But that doesn’t make Go a bad language. The language designers are very opinionated and you might dislike them and their decisions.

      I haven’t used Rust but from what I’ve seen, it’s a lot less readable than Go. And the only thing more important than readability is whether or not the code does what it’s supposed to do. For that reason I doubt I’ll ever use Rust outside of specific circumstances.

      *I’m using “a bad language” as shorthand for “a language you shouldn’t use”. Maybe they don’t think it’s bad but amounts to the same thing.

      • Feathercrown@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        And the only thing more important than readability is whether or not the code does what it’s supposed to do.

        Isn’t that exactly what Rust is supposed to be good at

        • arendjr@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          6 months ago

          And conversely, something Go is very bad at. For example, os.Chmod silently not doing anything on Windows.