Ray Dillinger scripsit:

> I do not understand this.  "macros that expand into imports" seems like
> a good idea; such a macro could expand into one of several different
> imports depending on availability.  But "only at the top but anywhere
> in the top level" seems like a contradiction to me, and "not embedded"
> seems redundant with "top level".  It makes me confused.

Yes, I changed "REPL" to "top level" at the last minute.  Bad idea,
using "top" in three different ways.

Trying again:

3) Imports, or macros that expand into them, are allowed in a module
only at the beginning, before any expressions or definitions.  They may
be used at any time in the REPL, but they must not be embedded in any
other form (except begin).

4) Imports, or macros that expand into them, are allowed in a module
or the REPL at any time, but must not be embedded in any other form
(except begin).

IOW, import is like R5RS define-syntax; you can't just put it anywhere
you please.

> > 5) Imports or macros that expand into them anywhere, including
> > embedded in other forms.
> 
> I think that this was what I proposed; import as a binding form with 
> lexical scope, usable anywhere a binding form may be used.  

Yes, that's what you proposed.  However, I think this is too flexible for
WG2 Scheme, and I strongly want WG2 Scheme to be a superset of WG1 Scheme.

> That is ... distasteful at best. The point being that you have to
> process imports so that you will know what macros are in scope while
> doing the rest of the macroexpansion, so you elevate cond-expand to
> have an all-new before-macro-expansion expansion phase?  

Well, obviously the macro that expands into an import cannot itself
be defined in that import.  This is another reason why I believe that
using macros before you define them is a Bad Idea for Thing One.

-- 
You are a child of the universe no less         John Cowan
than the trees and all other acyclic            http://www.ccil.org/~cowan
graphs; you have a right to be here.            [email protected]
  --DeXiderata by Sean McGrath

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to