3 ms·
I also like language constructs which have constrained definitions, eg in python list and other comprehensions vs for loops. The comprehensions are very limited
by jxramos 3y ago
I also like language constructs which have constrained definitions, eg in python list and other comprehensions vs for loops. The comprehensions are very limited in their side effect outcomes and intent, the for loops are much more open ended. Don't use a more open ended construct when a more narrow one can be used. This is sort of analogous to the using narrowest scope possible rule of thumb, use the narrowest conceptual space when authoring software.