[gambit-list] macro-expand

Christian Jaeger christian at pflanze.mine.nu
Mon Mar 10 14:37:03 EDT 2008


Joel Borggrén-Franck wrote:
> Is this possible? '(begin)' is as far as I can tell not a valid form
> in r5rs? Both 'lambda' and 'begin' requires a '<sequence>' which
> requires at least one '<expression>'  which at a glance can't be
> empty.
>   

I'm too lazy to check any *r*rs right now, but I think it would only be 
natural / consistent to allow empty begin. That's not 'logically' the 
same as an empty lambda, i.e. it's reasonable that it depends on the 
environment where you put an empty begin form, and not on the begin form 
itself, whether it is valid. (Note that I think "begin" is rather just 
meant as a list of forms to be merged into the environment. Calling it a 
sequencing form could be called wrong, since it's the lambda around it 
which does the sequencing, not the begin itself. Anyway that's how I see 
it being implemented in Gambit (4.0 beta 21 anyway) and it does make 
sense to me.)

In fact Gambit doesn't allow empty lambdas, which is why I put the fake 
form there.

Christian.





More information about the Gambit-list mailing list