[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: semantics of ?=
Bruce Hoult wrote:
>
> At 1:13 AM -0400 17/9/02, P T Withington wrote:
> >On Sunday, Sep 15, 2002, at 20:00 US/Eastern, Bruce Hoult wrote:
> >
> >>I believe that use of ?=it in awhile() should refer to a variable of
> >>that name in the textual environment in which awhile is mentioned.
> >
> >I.e., as if awhile were expanded without hygiene for 'it', just like
> >C would do.
> >
> >I was not party to the #dylan conversation, so perhaps I am missing
> >something; but I agree with Bruce.
>
> The guts of it (but hopefully better thought-out) is what you see on
> the newsgroup/info-dylan.
>
> Unfortunately, both gd and fd currently behave identically in
> thinking that "it" is unbound in intermediate-level macros such as
> pig-out unless you use ?=it there too. "it" is available at the root
> (non macro) level without ?=. Which I think is pretty useless and
What do you mean by "being available"?
"?=" used in a macro definition simply says:
Inject or look up this identifier in(to) the expansion scope instead of
the macros definition scope.
> possibly dangerous. This may well be correct according to the spec,
Sorry but I cannot see where this could be dangerous. If in definition context
there is a binding "it", than that will be used. Just like \element etc.
Gabor
> but if so I don't think it's a *useful* spec -- or a necessaru one.
>
> -- Bruce