[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R5RS draft: <body> in LET{REC}-SYNTAX ???



I don't see the problem here.  Richard Kelsey wrote:

> But there is some confusion.  We (or at least I) would
> like to allow LET{REC}-SYNTAX forms that are at top level
> to expand into a sequence of definitions that are spliced
> into the program.  This would be disallowed if the usual
> `expressions are evaluated in order and the value(s) of
> the last one is returned' language were used.  Splicing a
> list of commands into a program has a perfectly reasonable
> semantics, and is already done with BEGIN.

Why can't a person who wants a LET{REC}-SYNTAX form to expand
into a sequence of definitions D1, ... just write the form so
it expands into (BEGIN D1 ...) instead?  This will work in every
context that admits a sequence of definitions.

If the problem has to do with the fact that R5RS Scheme doesn't
let you mix top-level definitions and commands within a single
top-level BEGIN, then I see the problem, but I don't think it has
much to do with LET{REC}-SYNTAX.  We should just change the syntax
to allow top-level BEGIN forms that mix definitions with commands.

Will