John Klein <[EMAIL PROTECTED]> writes:

> I have upgraded to 18d, and I am a bit baffled by require.
> What is the correct use of require?
>
> Before 18d, I would do (require 'foo) and
> cmucl would load "foo.x86f" in (ext:search-list "modules:")
>
> Now, 18d has changed it to try to load
> "foo-library.x86f" in (ext:search-list "modules:")
>
> But the CLHS says that my old usage is nonportable and that
> require is deprecated.
> Following the CLHS, should I define (ext:search-list "mylib:") and do
> (require "foo" "mylib:foo") to specify the explicit filename?
>
> So what the philosophically correct way to use `require', if I want
> to ensure compatibility with future cmucl revisions?  
> Is `require' still meant to be used, given that it is deprecated?

Personally I think that you are nearly always better off to either
create your own require-like mechanism, or to use one of the defsystem
utilities, which take care of compiling and loading code as needed.

REQUIRE seriously only ever works halfway decently to load
implementation-supplied stuff (if that is the documented way to do
it), and even this usage is obviously implementation-dependent.

> What was the reason for the -libraries change in 18d?

The change was made in order to allow require to work as is to load
the implementation-supplied libraries, i.e. CLX, CLM, gray-streams,
etc.

Regs, Pierre.

-- 
Pierre R. Mai <[EMAIL PROTECTED]>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein


Reply via email to