Conversation

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
Replying to and
Go interfaces are almost type classes. Drop reflection / dynamic casting / runtime typing. Add type parameters, and allow using interfaces as bounds on them for static dispatch via interfaces. Drop tons of hard-wired special cases due to that. Basically, apply some good taste...
1
2
Replying to and
I like the general concept behind Go, just not what they actually created. If they had been deeply familiar with ML family languages, I think there's a very high chance they would have created a language that I'd think is great. It's so close in a sense, yet so far in practice.
2
2
Replying to and
I followed development of Go from the announcement, and I'm very familiar. I made the mistake of choosing it for some projects and have written a fair bit in it. The language design cripples library design so much too, so despite a lot of great library design, they're not good.
1
3
Replying to and
Drop multiple return values and have proper tuples. Replace UTF-8 by convention with real UTF-8. Make pointers non-nullable and replace null with sum types (compiler can still use null). Remove switches, and provide pattern matching instead. Remove lots of more hard-wired stuff.
1
4
I don't think orphan instances should be permitted at all. Rust doesn't permit them. Go doesn't permit defining new methods at all. Go's interfaces are just based on method naming rather than there being explicit implementation so that wouldn't really be an option for it at all.
1