Conversation

Replying to and
As in you can write functions / methods taking (ResultType, ErrorType) and compose them together. Of course, that's not going to work very well without the ability to write code that's generic across types, which is tied into this too. Go is quite hostile towards code reuse.
2
4
Replying to
It seems like a consequence of core decisions about the type system (e.g. not supporting algebraic data types). I'm not sure if I'd agree that it's hostile to code reuse, you just have to reuse at a higher level of abstraction (libraries).
1
2
Replying to
It doesn't have good support for reuse via libraries since in so many cases it forces writing specialized code or use the awful hack of reflection and dynamic casting. In that sense it's a lot like Java before it had half-baked generics. I wouldn't call these conscious decisions.
1
1
Replying to and
To be a conscious decision, they would have needed an understanding of the other design choices and experience with them. It's clear they didn't. The decisions would make some sense in a world where only terrible type systems and generics like the ones in Java and C++ existed.
1
5
Replying to
I wouldn’t presume that they were unfamiliar, but instead chose simplicity of compiler implementation over other approaches. There are many cases where there are trade-offs between simplicity of implementation vs. interface and the Go authors come from a philosophy of the former.
1
1
Replying to
I don't think Go has simple or minimal language design. It has a lot of special cases and hard-wired solutions to problems, rather than elegant features fitting together well. It's the opposite of having small, reusable solutions to problems like composability of *nix utilities.
1
14
Replying to and
The spirit of Go is hard-wiring special-cased features into the language, in a way that programmers cannot implement themselves. The Go designers can make generic types like arrays, slices and maps, but you can't. They can do product types (multiple return values), but you can't.
1
10
Replying to and
It's hostile towards code reuse and programmers. It's deliberately bad, and aimed at what they think fits the lowest common denominator, but I don't think it succeeds at that. The language not providing solutions doesn't make the problems go away. Sometimes worse is just worse.
1
9
Replying to and
The features it has are awkward to use together and don't compose well. It's everything that they claim is bad about languages with good type systems. Interfaces end up being awkward and force a lot of boilerplate and repetition. Those are so close to being great, but they fail.
2
5
Replying to and
My idea of a good programming language is an ML-based language with type classes. OCaml without object orientation and with their type-generic modules replaced with type classes is pretty much what I want. No class inheritance, no exceptions, no reflection / runtime typing, etc.
1
6
Replying to and
I certainly agree with the Go designers about a lot of what is bad and should be left out of the language. The problem is that what they have left is not a good language. I don't want a larger language, but definitely a far more expressive and substantially better designed one.
1
5
Show replies