[r6rs-discuss] Problems with EVAL
andre at het.brown.edu
Thu Sep 13 00:42:48 EDT 2007
On Wed, 12 Sep 2007, Abdulaziz Ghuloum wrote:
> "environment" was a syntax in 5.91 (IIRC) and was changed to a procedure
> in order to allow it to load extensions at runtime. This allows one to
> write a plugin loader where the exact set of possible plugins is not known
> at compile time. I have recently made good use of this facility when I
> was benchmarking three implementations of hash tables under ikarus. The
> benchmarking script takes a library name as one of its arguments and
> evaluates an expression in an environment containing that library.
> Under ikarus, "environment" takes care of loading libraries that are not
> already loaded.
So ENVIRONMENT must have a library-name -> resource mapping available
at runtime or it would fail. I guess my issue came down to who is
responsible for creating this mapping at runtime. Obviously it cannot
be the compiled program itself, which cannot anticipate the needed
libraries, so I guess this is simply unspecified and implementations
can do what they want. I guess that's fine.
More information about the r6rs-discuss