|
|
|
|
|
by lokar
107 days ago
|
|
I’ve always felt like the lack of many complex language features nudges teams to also keep their code simple. There is always two aspects to a language works in practice: how it formally works, and how the community uses it. Go is (was?) simple, and also (encouraged by the language and influence from its developers) the community mostly aims to keep the usage simple. |
|
For example, in typescript you can define a json value as something like:
Go forces me to reach for interface {}, and use a nest of dynamic dispatch code. It’s horrible. Go code is harder to write, harder to read and it runs slower as a result.The decision is baffling. Especially given go now has generics, which are waaay more complex than enums. And sum types in go could be used to fix the constant (result | error) boilerplate. And remove nullability. Sigh.