Re: [Readable-discuss] Sweetening code with #'
Readable Lisp/S-expressions with infix, functions, and indentation
Brought to you by:
dwheeler
From: David A. W. <dwh...@dw...> - 2014-10-11 21:46:19
|
> On October 4, 2014 10:00:23 AM EDT, martijn brekelmans <tij...@ms...> wrote: > >I'm following practical lisp and there's a little bit of code using a > >#', I can't figure out how to sweeten this piece of code. Using the > >sweeten tool replaces #' with syntax, (the result is also in the > >pastebin link below), but it doesn't work when running, clisp tells me > >syntax is undefined. It may not be as obvious as it *should* be, but near the end of the Common Lisp tutorial is this text: > Sweeten is designed to read Scheme (or more specifically, Guile) S-expression syntax. The "-C" option adds some support for Common Lisp notation instead, in particular, #'function. So just use: sweeten -C filename.lisp > filename.slisp and you should have a sweetened version of "filename.lisp" in "filename.slisp". If it used #'function, it should continue to work. Sorry that you *have* to use -C, but the semantics of #' differ between Scheme and Common Lisp, so the "sweeten" program has to know that you're using Common Lisp semantics. --- David A. Wheeler |