Why Go is not my favourite language
2 days ago
- #error handling
- #language critique
- #Go programming
- Go has exceptions and requires exception-safe code despite claims otherwise.
- Go's `defer` statement is mandatory for cleanup but can lead to verbose and less efficient code.
- The `if ... := ...; ...cond...` syntax is limited by scoping rules, leading to verbose error handling.
- Interfaces in Go can be satisfied by pointers, causing confusion about whether to pass structs or pointers.
- Maps and channels require `make()` unlike other types, which can be inconsistent.
- Go lacks interfaces or inheritance for variables, which can be limiting.
- Go's compiler has no warnings, pushing such checks to external tools, adding manual steps.