[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: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] patch: treat #t as alternative to else in cond |
Date: |
Fri, 15 Nov 2013 22:12:43 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Fri, Nov 15, 2013 at 03:51:50PM -0500, John Cowan wrote:
> (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 see.
> > 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.
It wouldn't have to be. It could expand to "the thing you get when
referring to QUOTE after importing the standard Scheme bindings".
In terms of CHICKEN, it could refer to (gensym 'quote) which serves as
a macro-aliased copy of ##core#quote through its plist.
> > 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).
I'd argue that's really a bug or an oversight in the spec.
Cheers,
Peter
--
http://www.more-magic.net
Re: [Chicken-hackers] patch: treat #t as alternative to else in cond, Evan Hanson, 2013/11/15