chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] patch: treat #t as alternative to else in cond


From: John Cowan
Subject: Re: [Chicken-hackers] patch: treat #t as alternative to else in cond
Date: Fri, 15 Nov 2013 15:51:50 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Peter Bex scripsit:

> > Rebinding quote gets you into trouble anyway, because the lexical syntax
> > 'x is unhygienic.
> 
> Is it in CHICKEN?  Does it have to be?  You could equally well rename it
> upon encountering it, so it can never get captured.  If you really wanted
> "the local quote", you should've expressly spelled it out.

Yes.  Even in hyper-hygienic Racket, (let ((quote -)) '5) => -5.
Note that I am not saying that the symbol `quote` is not hygienic, I'm
saying that the supposedly equivalent lexical syntax is not.  This is
a consequence of R5RS:

        (quote <datum>) may be abbreviated as ’<datum>. The two
        notations are equivalent in all respects.

This is true at the level of datums, not at the level of code.

> I disagree there.  What if you don't import them from their module?

In that case, 'x expands to (quote x), which produces an
undefined-variable error.

> I think the quotation stuff should always work, regardless of whether
> you've imported the right thing or rebound it.  As long as it's available
> in the "core" it should work.  And AFAIK in CHICKEN, 'foo gets read as
> (##core#quote foo) anyway.

That may happen at some stage, but (equal? (quote foo) 'foo) => #t,
so it is not true in the reader (and would be non-conformant if it were).

-- 
Barry thirteen gules and argent on a canton azure           John Cowan
fifty mullets of five points of the second,             address@hidden
six, five, six, five, six, five, six, five, and six.
        --blazoning the U.S. flag           http://www.ccil.org/~cowan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]