Loops
Loops using for
and while
and suchlike are a bit outdated these days. Use pipeline operations like map and filter instead. They are easier to read and more flexible.
Sources
- This smell is included Martin Fowler's book "Refactoring", 2nd Edition
Back to All Code Smells