This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: load-relative trouble


thomas kirk wrote:
> > Of course the really cleanest solution is: don't use load
> or load-relative.


Since the documentation is now discouraging use of load in
favor of include, it seems worthwhile to clarify whether
you're leaning towards eliminating support for load altogether.

No, that is not the plan. In fact the main thing holding up a new release of Kawa is (finding time to) figure out how the "dynamic environment" (including eval and load) should work. Right now things are a little more inconsistent than I like.

I understand the advantages of include for compilation, but load provides functionality that include doesn't offer, namely runtime loading (and re-loading) of compiled code. For long running applications, the ability to update code
dynamically is often essential. Of course include can reload
from source, but that seems like a step backwards.


If you intend to deprecate load, what mechanism for loading
compiled code do you suggest?

It's worth remembering (for me) that while most people use load to load Scheme source files, some people (such as you) do load compiled modules.

I still want to support this, but it is worth pointing out
loading and (especially) re-loading are somewhat fragile,
because it isn't strongly specified what assumptions the
compiler makes, what gets inlined, and what bindings are
direct/inlined and what are indirect/dynamic.  It might be
useful to think about how to do old-fashioned separation between
interface and implementation, so you can hot-swap implementation
as long as the interface doesn't change.

But for now I'm just trying to clean up some inconsistencies
and actually provide better/cleaner support for load/eval.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]