>After all, Go ignores all progress in programming
languages for the last 40 years.
I've seen this meme being spouted so much every
time Go's mentioned it's ridiculous.
Is it a meme when it is true? To support this question, witness the statements of Rob Pike[0] below.--- Regarding the utility of supporting first-order functions[1]: I wanted to see how hard it was to implement this sort
of thing in Go, with as nice an API as I could manage.
It wasn't hard.
Having written it a couple of years ago, I haven't had
occasion to use it once. Instead, I just use "for" loops.
You shouldn't use it either.
---Regarding progress in programming languages[2]: One thing that is conspicuously absent is of course
a type hierarchy. Allow me to be rude about that for
a minute.
And[2]: Programmers who come to Go from C++ and Java miss
the idea of programming with types, particularly
inheritance and subclassing and all that. Perhaps
I'm a philistine about types but I've never found
that model particularly expressive.
---The part about "particularly inheritance and subclassing and all that" is ironically a meme spouted by Go's community so much it is, if you'll pardon my borrowing your description, ridiculous. For the curious, there are many community "Go-isms" explainable by the Pike talk[2]. Even a casual reading of the "list of significant simplifications in Go"[1] (35 in all) is enough to reasonably support the "ignoring all progress" position. Of course, YMMV. 0 - https://en.wikipedia.org/wiki/Go_(programming_language) 1 - https://github.com/robpike/filter 2 - https://commandcenter.blogspot.com/2012/06/less-is-exponenti... |
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.