SRFI 212: Aliases
Arthur A. Gleckler
(22 Sep 2020 19:00 UTC)
|
Re: SRFI 212: Aliases
Per Bothner
(22 Sep 2020 19:53 UTC)
|
Re: SRFI 212: Aliases
Marc Nieper-Wißkirchen
(22 Sep 2020 20:26 UTC)
|
Re: SRFI 212: Aliases
Jim Rees
(23 Sep 2020 13:15 UTC)
|
Re: SRFI 212: Aliases
Jim Rees
(23 Sep 2020 13:16 UTC)
|
Re: SRFI 212: Aliases
Marc Nieper-Wißkirchen
(23 Sep 2020 13:23 UTC)
|
Re: SRFI 212: Aliases
Jim Rees
(23 Sep 2020 13:53 UTC)
|
Re: SRFI 212: Aliases Marc Nieper-Wißkirchen (23 Sep 2020 14:03 UTC)
|
Re: SRFI 212: Aliases
Jim Rees
(25 Sep 2020 02:38 UTC)
|
Re: SRFI 212: Aliases
Marc Nieper-Wißkirchen
(25 Sep 2020 05:58 UTC)
|
Re: SRFI 212: Aliases
Jim Rees
(25 Sep 2020 18:10 UTC)
|
Am Mi., 23. Sept. 2020 um 15:53 Uhr schrieb Jim Rees <xxxxxx@gmail.com>: > > On Wed, Sep 23, 2020 at 9:23 AM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote: >> >> >> > And 2nd question -- w.r.t. to free-identifier=?, what's the name of an alias to an unbound identifier? It's own name, or the name of the original source id? >> >> The name of an identifier is a property of the identifier, not of its >> binding. In particular, syntax->datum won't return the name of the >> other identifier. >> >> > ;; pre-conditions: x and y are not bound >> > >> > (define (is-x? id) (free-identifier=? id #'x)) >> > >> > (let () >> > (alias x y) >> > (is-x? x)) >> >> This should return `#f' (after adding (syntax ...) as you wrote in >> your next email). > > > These answers seem to conflict with each other. > > (syntax->datum #'x) is always x - good that tells me that there's no special object class for the result of an alias form -- it's just an identifier, possibly bound, possibly not, and now the new feature is that it can be "bound" to be un-bound -- and if so, it should have the same behavior as the same-named identifier that was never bound in the first place -- (or is this my confusion? is an un-binding distinct from a never-binding?) > > Why would is-x? return #f? The outer x and the inner x are both un-bound, and both have the same name x. My mistake. I should have paid more attention to what I had read before I answered. I answered to what (is-x? #'y) would evaluate, not to what (is-x? #'x) would... So, yes, the latter would return #t because of the reasons you gave. Sorry for the confusion.