Remix.run Logo
stouset 7 hours ago

No, you’re clearly wrong; golang was always going to add support for generic functions.

Everyone also wanted and accepted the need for generics. It was always something they wanted to add to the language. Rob Pike never said that that kind of abstraction isn’t what golang is for. It was always just a matter of getting the design right.

Go has always been a systems language. It was one when we thought it was going to fit nicely for low-level, high performance use-cases. Given that the GC, runtime overhead, lack of control over memory layout, and other issues made it a poor fit for what we historically thought were systems language tasks, it’s still a systems language because we’ve grown to understand that the term “systems program” has always meant network middleware that shuttles around JSON and transforms it.

Dependency management too. Modules were something that nobody argued were unnecessary. None of the language developers ever claimed that “you should always build against HEAD, and if upstream breaks you, that’s a coordination problem to be solved socially”. The community didn’t need to independently invent godep, then glide, then govendor, then dep, before the core team finally shipped modules. That was just enthusiastic parallel exploration of a problem space that everyone agreed was a problem.

GOPATH was always understood to be an awkward temporary scaffold that everyone tolerated while the real solution was being designed. The single-workspace model was never defended as philosophically correct or a deliberate feature of the language. When modules arrived, everyone was simply relieved that this obvious stopgap was finally replaced.

The core team always intended to add builtins for min/max. Nobody ever told you to just write `if a > b { return a }; return b` yourself because it was “only two lines.” The fact that every Go codebase in existence had its own copy of this logic, typically buried in a file called util.go, was not evidence of anything being missing from the language.

Range was always a stopgap before iterators could be implemented. Nobody ever argued that iterators were needlessly complicated and went against the spirit of the language. The slices and maps packages provided important missing features that everyone using the language wanted.

Everyone agrees that errors were anemic from the outset. errors.Is/errors.As are nice additions but everything was Just Fine™ before they were added.

Speaking of errors, having two lines of error-handling boilerplate for every line of code is good, and right, and perfect. It’s not verbose; it’s “explicit”. But when that gets changed to be less verbose, we will all agree that it was always a pain and made reading code unnecessarily more difficult and that everyone always expected this to be fixed some day.

I personally can’t wait to see what next development will never have been “against the Go philosophy” and definitely not something that gophers argued was perfect the way it was any time misguided malcontents and rabble-rousers wrongly tried to suggest the language wasn’t perfect the way it was.

cyphar 6 hours ago | parent | next [-]

> The community didn’t need to independently invent godep, then glide, then govendor, then dep, before the core team finally shipped modules. That was just enthusiastic parallel exploration of a problem space that everyone agreed was a problem. When modules arrived, everyone was simply relieved that this obvious stopgap was finally replaced.

And of course, it was replaced with a more correct implementation that was incompatible with that awful stopgap because semantic correctness trumps all. vendor/ trees and GOPATH were never meant to be remotely compatible, and don't you know -- the Go compatibility guarantee(TM) doesn't apply to misuse of GOPATH to work around shortcomings^Wwell-considered designs of Go, even if it breaks the largest Go project at the time!

(/s It still shocks me that they decided to drop "src" from vendor/src and break compatibility when they finally got around to supporting vendoring despite every tool using it. And symlinks don't work because Plan 9 is the future!!)

jpc0 7 hours ago | parent | prev | next [-]

> term “systems program” has always meant network middleware that shuttles around JSON and transforms it.

Who are we that has always defined that term that way. For any systems programmer golang has pretty much not been a solution.

Systems is below layer 4 of the network stack, it is building the network stack in the first place.

masklinn 7 hours ago | parent | next [-]

I think your sarcasm detector has gone missing chief.

Joker_vD 4 hours ago | parent | prev [-]

Um, there is user-level implementation of TCP/IPv4+IPv6 stack in Go [0], developed and used by Google as part of its gVisor.

[0] https://github.com/google/netstack

thayne 6 hours ago | parent | prev [-]

> I personally can’t wait to see what next development will never have been “against the Go philosophy” and definitely not something that gophers argued was perfect the way it was any time misguided malcontents and rabble-rousers wrongly tried to suggest the language wasn’t perfect the way it was.

I really hope it is more ergonomic error handling. Or maybe sum types/discriminated unions.

stouset 6 hours ago | parent | next [-]

Those are fine the way they are. I don’t want the language getting more complicated. Rob Pike has said they’ll never happen. Suggestions like this are extremely against the Go way of doing things. Actually the verbosity is a good thing. It’s explicit.

Joker_vD 5 hours ago | parent | prev [-]

> I really hope it is more ergonomic error handling.

They've publicly said no more language changes specifically for better error handling are coming, it will at most be the library-level improvements.

stouset 5 hours ago | parent [-]

So this would be in line, then, with all of the other features they’ve publicly said aren’t coming and aren’t necessary but then do anyway after retconning their original stance?

Joker_vD 4 hours ago | parent [-]

Could esteemed commenters please read the words the Go language team actually wrote?

    > Or, we could decide that parameterized methods do not, in fact, implement
      interfaces, but then it's much less clear why we need methods at all. If
      we disregard interfaces, any parameterized method can be implemented as a
      parameterized function.
    
    > So while parameterized methods seem clearly useful at first glance, we
      would have to decide what they mean and how to implement that.
Well, they have finally decided what parameterized methods actually mean, and they see how to implement that, and it all seems clearly useful. So...