|
|
|
|
|
by the_other_guy
2688 days ago
|
|
It's hard to argue with someone who sees these 2 examples are the SAME thing, if you really see the 2nd example is equivalent in _SAFETY_ and readability as the first one, you probably haven't written much code or used many languages In every other language, people keep arguing about advanced features, moving forward and such, only in Go people defend the undefendable and reject any kind of the simplest obvious improvements, I say so and I am sad because I use Golang very heavily, it's sad to see a modern language so popular and its core designers are still stubborn about doing anything in the right direction even if it is as simple as adding enums |
|
Readability-wise, this is disputable, the go version is a bit more verbose, but I can't imagine a developer not understanding what happens there at first sight.