The Startup
Published in

The Startup

All Loops Are a Code Smell

The death of for, while, and their ilk.

Loops are a fundamental part of programming. We need to do something for each item in a list. We need to read input until input is exhausted. We need to put n number of boxes on the screen. But every time I see a loop being added to code in a PR, my eyebrows go up. Now I have to examine the code closely to ensure the loop will always terminate…

--

--

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +768K followers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store