3 ms·
It's just a consequence of the Lisp syntax: (if COND THEN ELSE), so this list has four elements, and the second is the condition, the third is one leg, and the
by hibbelig 10y ago
It's just a consequence of the Lisp syntax: (if COND THEN ELSE), so this list has four elements, and the second is the condition, the third is one leg, and the last is the other leg. How would you make the "THEN" part longer, except by wrapping parens around it?
To use a metaphor: In typical infix languages, I can only add two numbers, not three. Why do I need to do strange things like using two plus signs as in "3 + 4 + 5" to add three numbers? Lisp can do it with one: (+ 3 4 5)
The answer to this metaphor is that the very idea of infix results in this limit. In the same way, the very idea of expressing everything as s-expressions results in that limitation.