4 ms·
A for loop, is a better construct than a map or more complicated language features because of the fact that its stupidly easy to understand. Im not saying maps
by cthaeh 6y ago
A for loop, is a better construct than a map or more complicated language features because of the fact that its stupidly easy to understand.
Im not saying maps and other functional paradigms are hard to understand, just that is more complicated than a for loop and confuses people far more.
This simplicity of a for loop is worth far far more than the saving of 2-3 lines of code and some abstract idea of elegance.