• abobla@lemm.eeOP
      link
      fedilink
      arrow-up
      27
      ·
      1 day ago

      I’m already writing my own dependency to check if a number is even:

      if (number == 0) return true
      if (number == 1) return false
      if (number == 2) return true
      if (number == 3) return false
      

      I’m almost there!

    • sping@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      That seems to be the Go way. Why put it in a library when everyone can just re-implement it themselves (and test and document it too, right? Right?).

      E.g. There isn’t even a standard set object, everyone just implements it as a map pointing to empty structs, and you get familiar with that and just accept it and learn to understand what it means when someone added an empty struct to a map. And then people try to paint this as a virtue of the language.

      • CptKrkIsClmbngThMntn [any]@hexbear.net
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 day ago

        E.g. There isn’t even a standard set object, everyone just implements it as a map pointing to empty structs, and you get familiar with that and just accept it and learn to understand what it means when someone added an empty struct to a map.

        Goooood fucking gravy.

        I hate to be such an opinionated programmer, but everything I’ve read about Go only reinforces my negative opinion, especially since I read this now-famous article.

        • sping@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          I have decades as a SWE, including deep (but now out-of-date) C++ experience, a lot more recently in serious Python systems, and a fair amount of web UI dev on the side.

          Now I have 1 year with Go. I came to it with an open mind having heard people sing its praises I thought it would be broadening to spend some time with a language new to me.

          My advice now is do anything you can to avoid working in golang. Almost daily, I seriously contemplate whether it’d be worth quitting and being unemployed, even in this economy (US). It is a better C, but that’s a low, low bar at least for the project domains I ever work in. Where it’s an even plausible answer, Rust is probably a better one (I think? - haven’t used Rust for anything real).

          • CptKrkIsClmbngThMntn [any]@hexbear.net
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 day ago

            Oooof, good to know. I have a bit more of a low level C brain at root so I see the appeal of Go, but never had enough of a reason to get into C++. I’ve only really used C# and JS/JS frameworks professionally.

            Rust is an absolute joy to work with. The strong typing, the hands-on memory management, the functional elements, the build system, the helpful compiler errors and warnings, the magical feeling that comes when your first successful compile since refactoring just works, the queer-friendly community… just the perfect language for the way my brain operates.

            I’m lucky to be unemployed at the moment and have time to make my own projects with tools of my choosing. There are definitely some barriers to using it in most workplaces, but most of those come down to adoption inertia and the fact that the language is still “new” - new in the sense that it’s not mature enough to have a mature enough frontend framework that has a mature enough third party component library for easy plug and play. Filling out all the corners that older languages have is gonna take a while.