9 ms·
Speaking of leaving parentheses out of lisp - you can go the whole way and have a whitespace lisp: http://draketo.de/light/english/wisp-lisp-indentation-prepro
by arethuza 13y ago
Speaking of leaving parentheses out of lisp - you can go the whole way and have a whitespace lisp:
http://draketo.de/light/english/wisp-lisp-indentation-preprocessor http://draketo.de/light/english/wisp-lisp-indentation-prepro...
- lispm 13y agoStuff like that exists for decades: For example RLISP: SYMBOLIC PROCEDURE SMEMBER(U,V); %determines if S-expression U is a member of V at any level; IF U=V THEN T ELSE IF ATOM V THEN NIL ELSE SMEMBER(U,CAR V) OR SMEMBER(U,CDR V); Which would be in Lisp: (defun smember (u v) "determines if S-expression U is a member of V at any level" (cond ((equal u v) t) ((atom v) nil) (t (or (smember u (car v)) (smember u (cdr v)))))) RLISP has been developed somewhere in the 60s/70s as a parentheses free notation for Lisp on top of Standard Lisp. Much of the computer algebra system REDUCE is written in RLISP.
- qu4z-2 13y agoThis strikes me as a much bigger and less obvious transformation than the one suggested by the grand-parent (although interesting none-the-less). Specifically, this seems to take semantics into account whereas the suggested representation is apparently purely syntactic. For instance, the transformation from IF U=V THEN T into (cond ((equal u v) t)) would seem to require an understanding of the IF construct and a mapping of infix operators to lisp functions at the least. Now, maybe this syntactic transformation has been around for decades too (the fact that I've independently toyed with the same idea suggests it's not uncommon to play with), and alternative Lisp syntaxes are quite interesting in their own right, but I do feel that the whitespace-lisp suggestion has merit in its own right (but again, I'm clearly biased). Essentially, it's an alternate syntax for s-expressions, not lisp.