You're right in pointing out the performance difference between a while loop and a higher-order function that I neglected to mention. I agree that under different contexts, for example, in an embedded system or in high-speed frequency trading, you may choose to use a while loop or an if statement due to memory or latency constraints.

My goal for writing this article is to encourage younger software engineers to explore different syntactic sugar and programming paradigms to express themselves. The article may have been too provocative for some. Nevertheless, thanks for reading & sharing your perspective!

Written by

🥚

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