4 ms·
Go does not have pattern matching. There are type assertions, but obviously that's not the same thing. Go has higher order functions in some sense, and the sta
by wonderzombie 14y ago
Go does not have pattern matching. There are type assertions, but obviously that's not the same thing.
Go has higher order functions in some sense, and the standard libraries use them for some things. But I wouldn't say they're nearly as ubiquitous as they are in Ruby or your average functional language. My read is that Go is pretty firmly grounded in imperative-land.
Regardless, since Go 1 came out relatively recently, I doubt they're going to make substantial changes to the language anytime soon. Obvs I don't speak for them, etc etc.
- tptacek 14y agoGo has full closures and first-class functions, and their use is as idiomatic in Go as it is in Javascript; for instance, they're the mechanism by which you implement filtering in the "http" package.