This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: About modules
>>>>> "Jost" == Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> writes:
Jost> Clark McGrew <mcgrew@ale.physics.sunysb.edu> writes:
>> From my perspective, the gh_new_procedure stuff is the only
>> thing that is likely to break many things. Would it be trivial
>> to have gh_new_procedure always add to the (guile-user) module
Jost> Yes of course. Next question: Which symbols should be
Jost> visible in (guile user); pure R5rs or almost everything? Do
Jost> you need the old C module API also?
As far as I'm concerned, kill the old C module API, but others may
feel differently.
R5RS defines interaction-environment, null-environment and
scheme-report-environment. The entire problem might be solved by
providing them as gh_ routines (ie gh_interaction_environment).
From R5RS: "The intent is that this procedure [interaction-environment]
will return the environment in which the implementation would evaluate
expressions dynamically typed by the user."
That sounds tailor made for the default environment. Again, only if
it's *easy*: I'd suggest that adding gh_interaction_environment that
creates returns a sort of global environment a little like guile-user.
By default interaction environment should include scheme-interaction
environment, and the "usual" guile extensions. The routines
gh_new_procedure, gh_define, and gh_load all work in this environment,
and be marked as obsolete. Then the new preferred routines (say
gh_add_procedure, gh_bind, and gh_load_file) would all take an
environment.
<aside>
Does anybody use gh_define, gh_load and friends? Maybe they can just
change.
</aside>
Thanks for working on this stuff. I think it's going to really
improve guile.
Cheers,
Clark