4 ms·
Even if there is agreement that this is a problem, it strikes me that it can become a problem. The standard library should be exemplary, what do you think woul
by GhotiFish 13y ago
Even if there is agreement that this is a problem, it strikes me that it can become a problem.
The standard library should be exemplary, what do you think would happen in the hands of a developer who's "not as smart as he thinks he is?"
Wasn't that part of go's pitch? I never really considered that libraries would go so far as to inspect the types for methods rather than just make those methods a requirement. The fact that they are able means someone else is going to use it, and it's going to bite me. Don't like.
- nknighthb 13y agoWhat was part of Go's pitch, exactly? And where did you see it pitched? People outside the Go team have tried to pitch Go as a lot of things, most of them having no relationship to what Go was actually intended to accomplish. The FAQ[1] may be enlightening. Nowhere does it say Go is supposed to be a straightjacket that makes bad programmers into good ones. [1] http://golang.org/doc/faq#What_is_the_purpose_of_the_project http://golang.org/doc/faq#What_is_the_purpose_of_the_project
- GhotiFish 13y agoYou'll have to forgive me, I'm at work right now so I can't pull up the talk Rob Pike did on Go, I think it was 2011. Around the point where he explained Go was not a language to expand the boundaries of computer science. It's for programmers who "often are not as smart as they think they are" I'll look it up when I get the chance. That might be later tonight.
- nknighthb 13y agoI'm reasonably confident you're assigning too much significance to what was probably an offhand remark in a particular context. I just looked at slides from a 2010 talk[1] by Pike which was pretty explicit about what they were doing in this area: "It's a form of duck typing, but (usually) checkable at compile time. It's also another form of orthogonality." And this one from Russ Cox in 2010[2]: "Compiled, statically-typed languages (C, C++, Java) require too much typing and too much typing: * verbose, lots of repetition * too much focus on type hierarchy * types get in the way as much as they help * compiles take far too long" A common theme for Go from the beginning has been the balance between type safety and not getting in the way of the programmer. The analogy to duck typing has been a consistent observation throughout Go's public existence. This is incompatible with the sentiment you took from whatever talk you saw. Go's architects didn't set out to make a Java clone. It's more like Java's evil twin. [1] http://talks.golang.org/2010/ExpressivenessOfGo-2010.pdf http://talks.golang.org/2010/ExpressivenessOfGo-2010.pdf [2] http://talks.golang.org/2010/go_talk-20100112.html http://talks.golang.org/2010/go_talk-20100112.html