[comp.archives] [lisp] Re: REQUIRE

mkant@glinda.oz.cs.cmu.edu (Mark Kantrowitz) (02/12/91)

Archive-name: languages/lisp/defsystem/1991-02-11
Archive: a.gp.cs.cmu.edu:/usr/mkant/Public/defsystem.* [128.2.242.7]
Original-posting-by: mkant@glinda.oz.cs.cmu.edu (Mark Kantrowitz)
Original-subject: Re: REQUIRE (was Re: Beginner ? - What is 'uses')
Reposted-by: emv@ox.com (Edward Vielmetti)

In article <1991Feb8.080116.24119@Think.COM> barmar@think.com (Barry Margolin) writes:
>REQUIRE is being removed because the behavior when the module isn't already
>loaded is very implementation-dependent, so it's virtually impossible to
>use it portably. Some systems treat the module name as a file name, looked
>up via some implementation-dependent search path; others treat it as a
>defsystem-style system name, and load the system; and others use some other
>mechanism.  If you supply a second argument, the pathname would be
>system-dependent (actually, we have since added logical pathnames to the
>language, so maybe this reason is no longer valid).

Why didn't X3J13 decide upon some standard definition of REQUIRE's
behavior? For example, have a global variable *central-registry* which
contains the directory where modules are stored?

My impression is that lisps use REQUIRE/PROVIDE/*MODULES* for two
separate purposes:
	(1)  Loading in implementation dependent packages, such as
	     graphics code, CLOS, streams code, and the like.
	(2)  Providing some sort of "MAKE" facility for common lisp.
There is nothing one can do about the former, since those uses of
REQUIRE are necessarily implementation dependent. However, the latter
should not be implementation dependent, because that would interfere
with generating portable code. By throwing modules out of the
language, X3J13 has given up the chance to establish standards for
such a "MAKE" facility and thereby ensure portability of system
definitions. In heterogeneous computing environments, where one runs
different lisps on different machines, or even on the same machine,
portability of system definitions is a must.

Anyway, I've written a portable common lisp implementation of systems
and modules, which is available free via anonymous ftp from
a.gp.cs.cmu.edu in the directory /usr/mkant/Public/. (cd to the
directory in one unit, since security restrictions prevent access to
intermediate directories.) The relevant files are
defsystem.{lisp,ps,text}. The documentation is old and is currently
being revised.  

--mark