On 17 Sep 2009, at 4:25 pm, John Cowan wrote:

> 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.)

Yep. That wouldn't couldn't shouldn't work in a REPL. But it'd be nice
if it worked in a module form or other such construct that means the
entire thing is available as a single s-expression, as not having to
think hard about how to order things to make the recursion work is
nice for the programmer.

> 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

Oh, the flashbacks! *hides*

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/archives/author/alaric/




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

Reply via email to