3 ms·
Wow, Go is worse than I thought! Sum types aren’t particularly ergonomic in C++ but at least it has them. And it has operator overloading, and generics, and `co
by BenFrantzDale 4y ago
Wow, Go is worse than I thought! Sum types aren’t particularly ergonomic in C++ but at least it has them. And it has operator overloading, and generics, and `const`, and deterministic lifetime. To me complex code can be made way more understandable by using the type system to say “this takes a const ref to a IPv4 or IPv6 IP address and returns a future of either a duration in nanoseconds or an error code”. Just like in mechanical engineering, where the units of an equation tell you a lot, the signature of a function in a language with a rich type system tells you that that’s probably a `ping` function. No wonder I have such a visceral averse reaction to Go.