Alaric Snell-Pym scripsit: > So, allowed: > > ... > (define-syntax foo ...bar...)
Fine, because define-syntax, like lambda, is allowed to refer to things not yet defined as long as they are defined before the new syntax is used. (Indeed, syntax transformers are syntactic sugar for various lambdas.) > (define bar (lambda (x) ...baz...wibble...)) Not fine. The syntax expander (which must in a REPL, absent first-class environments, be applied to forms as they arrive, should not have to be prescient enough to know that (baz ...) is new syntax rather than a procedure call. (All other uses of baz, of course, are out of the case; they *are* references to an undefined variable.) > (define-syntax baz ...foo...) > ... > (define wibble 10) No problems here. > (define bar wibble) > (define wibble 10) Quite. -- No, John. I want formats that are actually John Cowan useful, rather than over-featured megaliths that http://www.ccil.org/~cowan address all questions by piling on ridiculous [email protected] internal links in forms which are hideously over-complex. --Simon St. Laurent on xml-dev _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
