|
|
|
|
|
by mixedCase
3595 days ago
|
|
> [1]: I don't see how that helps your argument. For loops are more than enough for that task, it's easily readable and universal. And Go does support first-class and higher order functions so not sure what you're talking about here. > [2]: How's ditching inheritance in favor of composition "ignoring the last 40 years"? It's the biggest example together with goroutines that proves that phrase is a meme, and that we've learnt a lot on typing best practices as an industry over the past couple decades. And as an added bonus, another thing that's a good example of Go actually looking back and improving upon what's been done before is the select statement. Most popular languages fall through by default with the switch statement. Outside of examples on the internet, I can't recall right now the last time I've seen a switch statement in the wild that didn't break at the end of every case. Making the case (pun not intended) for a fallthrough statement and having switch/select break by default. |
|