News for hackers. Stuff that matters.
Re:Making the move from Scala to Go by macintux on Tuesday January 24, 2017 @10:36PM (#13478239)
I would argue that for loops are imperative, map/fold/etc are more declarative. That leads to various benefits such as less code, fewer bugs, fewer off-by-one errors.

And, man, tail recursion in a language with function head pattern matching (ML family, Erlang) is so much easier to read than any complicated for loop.

(Update: realized afterwards that "foreach" isn't quite the same as "for", but the larger point still stands, mostly.)

There are no comments on this comment yet.