My proposal aims not to break traditional
notation. An s-expression consisting only
of parens, atoms and whitespace should read
normally. Instead, if a special token appears at column
N, it "opens" an s-expression (just like a
left paren), which is closed when the next
line starts in a column <= N. E.g. if the token were ":", then (def rev (xs)
((afn (xs acc)
(if (no xs)
acc
(self (cdr xs) (cons (car xs) acc))))
xs nil))
could be writen as :def rev (xs)
::afn (xs acc)
:if (no xs)
acc
(self (cdr xs) (cons (car xs) acc))
xs nil
or even: :def rev :xs
::afn :xs acc
:if :no xs
acc
:self (cdr xs) :cons (car xs) acc
xs nil
|