4 ms·
Lisp: (loop for i from 1 to 10 collect i) Ruby: [1..10].collect { |x| x } But anyway, it turns out that people are not born with an inherent ability t
by jrockway 17y ago
Lisp:
(loop for i from 1 to 10 collect i)
Ruby:
[1..10].collect { |x| x }
But anyway, it turns out that people are not born with an inherent ability to parse infix operators. Infix is just as arbitrary as prefix or postfix. Anyone, even a kid, will figure the syntax out either way.
(Infix leads to confusing bugs, like "why doesn't 'foo < bar < baz' work?" Prefix eliminates this ambiguity.)