• interolivary@beehaw.org
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Go does have generics nowadays, although they have some limitations (like pointer types being inefficient because reasons).

    But yeah I’d tend to agree. Go’s strength and explicit design goal is that it’s relatively easy to learn and get started with, meaning it’s fast to onboard new devs. It’s very much a “get shit done” language.

    It’s weakness is – to paraphrase someone criticism of Go – the core dev team’s extreme unwillingness to adopt any programming language and tool chain designs and patterns invented after the 70’s. Pike’s rationale against generics was that in cases where you’d normally reach for generics you can either use interfaces (and especially interface{} which is like Go’s void* and throws all type information out the window and is slower than proper types because reasons), or just copy and paste code. Because what you as a developer want to do is reimplement something like Find(needle SomeType, haystack []SomeType) for the Nth time in every project, or take a performance hit and lose all type information by using interface{}.

    And don’t even get me started on how long it took for Go to get proper dependency management and what the arguments against it were, Jesus fuck.

    Go is currently the language I’m most fluent in after having written mostly Go for something like 8 years or even more (I remember when error was Error, pre 1.0 I think) and the one I’d be the most productive in, which is sort of unfortunate since I really don’t like it as a language 😁 Learning Julia at the moment though, since I’m going back to the university to study some more computer science and maybe get into evolutionary algorithm research, and Julia is a neat language for lots of different number crunch-y tasks (no I won’t touch Python, significant whitespace is a crime against common sense and fully dynamic typing gives me the heebie jeebies)