[Readable-discuss] wisp as draft SRFI-119
Readable Lisp/S-expressions with infix, functions, and indentation
Brought to you by:
dwheeler
From: Arne B. <arn...@we...> - 2015-03-18 21:27:25
|
Hi, Wisp is now in draft state as SRFI-119: http://srfi.schemers.org/srfi-119/ The version up there is mostly what we discussed here. The main part which changed are the clarifications. - To represent tail notation like (define (foo . args)), either avoid a linebreak before the dot as in define : foo . args or use a double dot to start the line: . . args. The first dot mark the line as continuation, the second enters the scheme code. - A dot as symbol at the end of a line is reserved for potential future use. It should be a syntax error if the next non-empty line starts with non-zero indentation. A lone dot at the end of a line calls for hard to catch errors. - A dot as only symbol in a line has no useful meaning: the line is by definition empty. As such, a dot as only symbol on a line is also reserved for future use and should be treated as a syntax error to avoid locking out future possibilities. The part I like best in the draft is the example which shows all features of wisp (including compatibility with curly infix) in just 7 lines: define : factorial n __ if : zero? n ____ . 1 ____ * n : factorial {n - 1} display : factorial 5 newline Best wishes, Arne |