Search posts, tags, users, and pages
Iterators are a code smell. We shouldn't use indices while iterating. Prefer higher level collections.
Maxi Contieri
@mcsee · Buenos Aires
Software Engineer
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Markdown supported · ⌘↵ to post
Chris Bongers
Nice one!
I do wonder some times I favor a basic for i++ loop since forEach is not 100% browser supported.
What's your take on that?
An implicit prerequisite is that the code must work.
So a beautiful and declarative not working foreach is not a choice having a working explicit i++
The code must always work. If you have evidence some browsers does not support the declarative one i am ok with the old way.
Shame on browser compatibility
Maxi Contieri That makes sense, thanks for explaining
And yes, shame on browser compatibility!
Chris Bongers
Nice one!
I do wonder some times I favor a basic for i++ loop since forEach is not 100% browser supported.
What's your take on that?