I’ve never ever heard while described as a smell, or even slightly smelly.
Care to explain?
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.
If you can smell it, there's something fishy in the neighborhood
I assume OP refers to the cases where "while" is used to re-implement existing operations... imagine finding code like this:
sure, there may be a good reason to implement things this way (maybe "todo" grows during iteration?), but maybe not, and then the loop should be instead simplified to: (as an aside, this is exactly the case where the comments are required: "# not using for loop because todo might grow" will make it clear it's an intentional decision and not hallucination or something written from ignorance)