Comment by dragonwriter
4 years ago
> Not sure why some programmers these days have aversion to simple loops and other boring - but readable - code.
Like goto, basic loops are powerful, simple constructs that tell you nothing at all about what the code is doing. For…in loops in many languages are a little better, but map, reduce, or comprehensions are much more expressive as to what the code is doing, but mostly address common cases of for loops.
While loops are weakly expressive (about equal to for…in), but except where they are used as a way (in language without C-style for loops) but there is less often a convenient replacement.
No comments yet
Contribute on Hacker News ↗