3 ms·
> With Lisp you can add new syntax "With Lisp you can have any syntax, as long as it looks like Lisp."
by Koshkin 8y ago
> With Lisp you can add new syntax
"With Lisp you can have any syntax, as long as it looks like Lisp."
- lispm 8y agoUnless it doesn't: CL-USER 14 > (loop for i from 0 below 10 sum i into isum when (evenp i) sum i into evensum of-type integer else when (oddp i) sum i into oddsum finally (return (* isum evensum oddsum))) 22500
- int_19h 8y agoArguably that still looks like Lisp (i.e. it's a valid S-expression). But then you also have reader macros...
- lispm 8y agoWell, s-expressions are not Lisp. Not every s-expression is a valid Lisp program. (1 * 2 ^ 3 + 1) is a valid s-expression, but not a valid Lisp program. With an INFIX macro it could be: (infix 1 * 2 ^ 3 + 1) could be a valid Lisp program, with a corresponding infix macro. But the Lisp syntax still is on top of the s-expression syntax...