[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistencies with free-identifier=? and bound-identifier=?
From: |
Jean Abou Samra |
Subject: |
Re: Inconsistencies with free-identifier=? and bound-identifier=? |
Date: |
Fri, 28 Jul 2023 12:08:12 +0200 |
User-agent: |
Evolution 3.48.4 (3.48.4-1.fc38) |
Le jeudi 27 juillet 2023 à 16:10 -0600, Timothy Sample a écrit :
> A quick follow-up.
>
> Timothy Sample <samplet@ngyro.com> writes:
>
> > Lastly, you should read section 3.1 of “Binding as Sets of Scopes”:
> >
> >
> > https://www-old.cs.utah.edu/plt/scope-sets/general-macros.html#%28part._.Identifier_.Comparisons_with_.Scope_.Sets%29
> >
> > It shows that ‘bound-identifier=?’ gives false negatives in both
> > sets-of-scopes and marks-and-substitutions hygiene systems. (I didn’t
> >
> > test that example or anything, but I thought it fit the theme of
> > identifier predicate arcana pretty well.)
>
> Actually, read section 3.2. It covers your example exactly. Discussing
> the example
>
> > (free-identifier=? (let ([x 1]) #'x)
> > #'x)
>
> it says,
>
> > Note: Racket’s macro system matches Dybvig et al. (1993), where both
> > free-identifier=? and bound-identifier=? produce #f for the above
> > arguments, and bound-identifier=? always implies
> > free-identifier=?. The current psyntax implementation, as used by Chez
> > Scheme and other implementations and as consistent with Adams (2015),
> > produces #f and #t for free-identifier=? and bound-identifier=?,
> > respectively; as the example illustrates, bound-identifier=? does not
> > imply free-identifier=?. The set-of-scopes system produces #t and #t
> > for free-identifier=? and bound-identifier=?, respectively, and
> > bound-identifier=? always implies free-identifier=?.
>
> You can actually control what ‘free-identifier=?’ returns for the above
> example using “scope pruning” when quoting syntax. Those Racketeers
> really have their act together.... :)
Oh, wow! I definitely need to read that paper. Thank you very much.
Cheers,
Jean
signature.asc
Description: This is a digitally signed message part