3 ms·
Option instead of nil is amazing. Imo, the biggest flaw in Go's design is having nils instead of optionals. I don't have a strong opinion on Result and Pattern
by tail_exchange 2y ago
Option instead of nil is amazing. Imo, the biggest flaw in Go's design is having nils instead of optionals.
I don't have a strong opinion on Result and Pattern matching - it seems nice, but I don't know if it adds much to the language. It is nice, but it may not be worth the complexity.
The error handling with ? is a no for me. I'd rather have something more like the go-errors/errors package in the standard library instead. This has been proposed before, and it was rejected for a good reason: it makes it too easy to be lazy and just bubble up errors instead of properly handling them.