Han-Wen Nienhuys wrote: > Why is module-define! not implemented using scm_module_define ?
Good question. AFAICS, the difference between these reduces to the difference (if any) between [scm_define_module] (variable-set! (module-make-local-var! module name) value) and [module-define!] (or (module-local-variable ...) (let ((variable (make-variable value))) (module-add! module name variable))) And the only difference between these appears to be in the case where the module has a lazy binder: the scm_define_module code will call the lazy binder with 3rd arg #t, whereas the module-define! code will call it with 3rd arg #f. I don't know if this difference matters, but I'd guess not, as surely the point of a lazy binder is actually to do a definition when asked for either a lookup or a definition. What a mess this code is, though. It feels as though if someone had the patience, they could reduce it by 90% just by applying careful mechanical transformations and removing duplication. Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel