logoalt Hacker News

d--btoday at 4:31 AM0 repliesview on HN

Probably because while is the source of many infinite loops, and because it’s sometimes faster and more rigorous to compute the length ahead of going into the loop.

That said, I personally don’t think it’s smelly at all.