This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
AW: difference between (load "package.foo.bar") and require?
- From: "Hoehle, Joerg-Cyril" <Joerg-Cyril dot Hoehle at t-systems dot com>
- To: dominique dot boucher at nuecho dot com, kawa at sources dot redhat dot com
- Date: Thu, 27 May 2004 18:44:36 +0200
- Subject: AW: difference between (load "package.foo.bar") and require?
Dominique Boucher wrote:
>When loading a file, all top-level definitions are added to
>the top-level interaction environment. The loading is done
>by 'load' using a custom class
>loader. That's why it does not take into account the .jar files.
Do yout have an idea where load looks for files?
In my case (base-uri) reports file:///.../tomcat/webapps
(running inside Test.brl) while the class files are in
.../tomcat/webapps/myapp/WEB-INF/classes/jch/xyz/
Even when I put (load "jch.xyz") inside BRL's sitedefs.scm, which is also in classes/, a file not found error is reported!
Thanks for all your explanations!
Per's explanation makes me wonder whether there's a mode where one can work with both compiled and source files (like in Common Lisp systems, where the loader will default to a .lisp file if a binary/fasl file is not found).
Currently, it seems to me like I must modify several places across all my files if I want to switch from loading .scm to using (require<>). Doing so would mean that I can no longer load the files from source -- (which is especially bad for interactive development).
I.e. a working
(load "jch.f1")
(load "jch.f2")
in BRL's sitedefs.scm would perfectly match my needs!
Jorg Hohle.