Re:Twelve Go Best Practices
by sanderjd on Wednesday July 31, 2013 @02:31PM
(#6135873)
For what it's worth, this is also a very common pattern in ruby, using blocks:
Having said that, I did need to read the Go version more than once to grok it. I theoretically like Go's syntax for defining functions that take functions, but in practice I find it quite hard to scan, especially if there are more parameters on top of the function, or the passed function has multiple returns, or (god forbid!) it takes a function itself - it can all become quite a lot of bookkeeping.
[ Parent
| on HN ]
There are no comments on this comment yet.