Right-to-left is equivalent to left-to-right in this regard: you're still reading in one linear direction, as opposed to Python, where you have to read inside-out and revisit later parts of the line to correctly understand previous parts of the line.
back
1 comments
Fair enough. And like I said, you're argument is certainly better than the article's.
I'm not really a fan of list comprehensions, I usually just use for loops. It does seem consistent with Pythons syntax though. For loop is `for item in items` and comprehensions have 'item for item in items'.
Nim has a macro in the standard library that allows you to use the actual for loop syntax as a comprehension.
let primeSquares = collect:
for n in 1..100:
if n.isPrime():
n * n