For Programmers: Free Programming Magazines  


Home > Archive > Lisp > November 2007 > MAKE-LOAD-FORM environment









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MAKE-LOAD-FORM environment
Kilian.Sprotte@googlemail.com

2007-11-29, 7:12 pm

Hi,

I am not completely sure what the environment arg is to be used for.

It seems that often a null-lex-env is passed. The forms returned e.g.
by make-load-form-saving-slots seem to normally reference the obj to
be externalized directly - is it correct that if there was a binding
in the environment for the obj the associated variable could be used
by make-load-form as a symbol instead?

Sorry, if I dont express myself clearly enough...

Thanks for any help,
Kilian

Steven M. Haflich

2007-11-29, 10:10 pm

Kilian.Sprotte@googlemail.com wrote:
> I am not completely sure what the environment arg is to be used for.
>
> It seems that often a null-lex-env is passed. The forms returned e.g.
> by make-load-form-saving-slots seem to normally reference the obj to
> be externalized directly - is it correct that if there was a binding
> in the environment for the obj the associated variable could be used
> by make-load-form as a symbol instead?


A make-load-form needs to be processed by the file compiler into some
code that will have the desired result at load time. The
make-load-form form may depend on constants or (symbol-)macros that
are defined in the compilation environment, but might not be defined
in either the Lisp image that is doing the compilation, or the Lisp
image that is later doing the loading.

The environment argument allows the make-load-form machinery to access
the environment appropriate to the make-load-form form.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com