[r6rs-discuss] Expansion process
Jens Axel Søgaard
jensaxel at soegaard.net
Thu Feb 22 15:56:47 EST 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
More information about the r6rs-discuss
mailing list