[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opaque syntax objects

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.



> > Indeed, nested quasiquote is notoriously mind-bending.
> > What part of the SRFI should be changed to fix that?
> > How does a lot of syntax->list help?
> 
> It isn't syntax->list that help.
> 
> Spotting #' or #` signals that here a piece of code is constructed.
> Spotting  ' or  ` signals that a list will be constructed, when
> the expanded code is run.

But this is exactly what the srfi does!

Andre has not gotten around to explicitly putting the "sharp"
abbreviations in the srfi, and the reference implementation
can not use them without losing portability, so you have
to write out |syntax| and |quasisyntax|, but you have to
use them in just that way.

Syntactic forms are just lists, but they are not lists of
symbols, they are lists of identifiers, so in that sense
they are completely different types.

To make lists of symbols, you _must_ use |quote| or
|quasiquote|, to make lists of identifiers you _must_ use
|syntax| or |quasisyntax|.

(OK, you could make a counter-example that constructs syntax
using quasiquote by starting with syntax and putting an
unquote in front of every single thing in the list, but it
would be going out of your way to obfuscate.  If there are
neither symbols nor identifiers in your list then you can
use either |syntax| or |quote| interchangably.)

-- 
     -- Keith Wright

Programmer in Chief, Free Computer Shop
 ---  Food, Shelter, Source code.  ---