[r6rs-discuss] Expansion process

From: Jens Axel Søgaard <jensaxel>
Date: Thu Feb 22 15:57:25 2007

Per Bothner skrev:
> When expanding a body, the specification says that the RHS of a
> define is deferred. An alternative would be to defer the
> expansion of *lambda* forms instead. That to me seems more
> natural.

I think it is due to libraries. Since "By default, all of an imported
library?s exported bindings are made visible within an importing library
using the names given to the bindings by the imported library", it
should be possible to check whether there is a conflict betweeen
imported names and names defined in the library. Postponing the
expansion of the RHS allows the expander to determine all names in the
global scope before expansion of the right hand sides begin.

It also simplifies the expansion of internal definitions.

-- 
Jens Axel S?gaard
Received on Thu Feb 22 2007 - 15:56:47 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC