3 ms·
What I really dislike about comprehensions is that the for syntax comes at the _end_. They would be much easier to parse if it came at the beginning.
by Tijdreiziger 8y ago
What I really dislike about comprehensions is that the for syntax comes at the _end_. They would be much easier to parse if it came at the beginning.
- kjeetgill 8y agoI used to feel that way too. When you write out nested for loops the work is at the other end! For what it's worth, it is meant to resemble mathematical set builder notation. I think that familiarity turned me around on it (pun intended). From that perspective it feels more natural. [0]:https://en.m.wikipedia.org/wiki/Set-builder_notation https://en.m.wikipedia.org/wiki/Set-builder_notation