[plt-scheme] apply syntactically bound (was RE: [plt-bug] all/10959: namespace-variable-valuecannot find 'apply' in base-namespace)

From: Jos Koot (jos.koot at telefonica.net)
Date: Fri Jun 4 13:33:57 EDT 2010

Thanks, you are right. That's why I was surprised that 'apply' does not have
a variable binding in a base-namespace. Nevertheless it seems contradictory
to me that (procedure? apply) returns true while variable 'apply' is not
bound as a variable in a base namespace. Now I know, thanks to Matthew, that
apply is a macro, I have adapted my own toy interpreters such as to capture
this issue. It seems to me that inclusion of identifier syntaxes introduces
a little inconsistency between symbols having a syntactic binding or a
simple variable binding. I very well know how to produce such mechanism, but
I am not sure that I like them, how versatile they may be.
Thanks, Jos

> -----Original Message-----
> From: samth0 at gmail.com [mailto:samth0 at gmail.com] On Behalf Of Sam Tobin-
> Hochstadt
> Sent: 04 June 2010 18:49
> To: Jos Koot
> Cc: Carl Eastlund; Matthew Flatt; plt-scheme at list.cs.brown.edu
> Subject: Re: [plt-scheme] apply syntactically bound (was RE: [plt-bug]
> all/10959: namespace-variable-valuecannot find 'apply' in base-namespace)
> On Fri, Jun 4, 2010 at 12:36 PM, Jos Koot <jos.koot at telefonica.net> wrote:
> > That may very well be the case. 'apply' in the operator position of an
> > expression like (apply bla bla bla ...) being expanded as by a
> transformer
> > and in other positions being expanded to something that evaluates to a
> > procedure. If this is the case, I think this should be added to the
> docs.
> In general, the docs avoid committing to whether something is a
> procedure or merely something implemented with a macro that behaves
> like a procedure.  This is because lots of identifiers may or may not
> be macros, depending on the precise implementation, but this
> distinction is mostly irrelevant, and we want the flexibility to
> change the implementation.  In this specific case, (procedure? apply)
> still produces #t, and thus in almost all cases it can be thought of
> as a procedure.
> --
> sam th
> samth at ccs.neu.edu

Posted on the users mailing list.