This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I'm using Orre's environment object type approach (the thing with local-eval and procedure->syntax ) in order to load procedures whose code is stored on some harddrive file into the running code, allowing them to refer to objects in the current environment as free variables, which would not work with the plain eval, e.g. in file test: (lambda () (set! x (+ x 1))) in the calling code: (let ((x 1)) ((local-eval (read (open-input-file "test")) ((procedure->syntax (lambda (x env) env))))) x) will return 2 Are there any important applications for local-eval, procedure->syntax and the like besides loading code from some port into the current environment? -- Klaus Schilling