3 ms·
>In the "perfect world", we would be using LISP, and our code would be data and our data would be code. Well, it wouldn't be that perfect, because then we'd be
by coldtea 12y ago
>In the "perfect world", we would be using LISP, and our code would be data and our data would be code.
Well, it wouldn't be that perfect, because then we'd be forced to live with that Lisp (lack of) syntax.
- lispm 12y agoWell, Lisp has a lot of syntax. It just looks and works different. For example the syntax of IF is: if test-form then-form [else-form] Examples: (if foo 1 2) (if foo 1) That means: after IF there are exactly two or three expressions. LET looks more complicated: let ({var | (var [init-form])}*) declaration* form* Example: (let ((foo 10) bar) (declare (integer foo)) (setq bar foo) foo) Note, the notation with parentheses is not the syntax of the Lisp programming language, but of symbolic expressions. The Lisp syntax is defined on top of s-expressions. Not every s-expression is a valid Lisp program. For example the following are not valid Lisp expressions, but still valid s-expressions: (if foo 1 2 (3) (4)) (let a (declare (integer 10)) 3 + a)
- hcarvalhoalves 12y ago> Well, it wouldn't be that perfect, because then we'd be forced to live with that Lisp (lack of) syntax. ... then someone would invent LispScript; later it turns out LispScript sucks as a declarative syntax, so someone else would invent LSX that compiles to LispScript that compiles to LISP :)