#' means different things in Scheme and in Common Lisp.

In Scheme, #'foo means (syntax foo).  It allows for #'(foo bar) to
mean (syntax (foo bar))

In Common Lisp, #'foo means "get the function binding of foo, not the
value binding".  I'm not sure but I think Common Lisp does not specify
what the s-expression it should translate to.

As you can see, out of the box the current readable-lisp interprets #'
using the Scheme meaning.

Note that you may find it easier to learn Scheme than Common Lisp; for
one, Common Lisp is a Lisp-2, which means that symbols have a function
binding and a value binding.

For quote, both lisps uses the same symbol, so you can sweeten something like:

  (bar quux)
  (nitz meow))
' foo
!   bar quux
!   nitz meow

Note the space after the quote symbol in the sweetened version.
Without the space it will be interpreted as attaching to just the foo
symbol, not the entire sub-expression.

On 10/4/14, martijn brekelmans <tijntj...@msn.com> wrote:
> I'm new to lisp and I thought using readable would be a great bridge for
> learning lisp. So far it's been pretty good, except for one time :(
> 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.
> Here's the piece of code that I'd like to sweeten.
> It would be great if the docs contained examples on sweetening expressions
> that use #' (and probably also for similar symbols, like ').

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
Readable-discuss mailing list

Reply via email to