views:

79

answers:

2

Common Lisp HyperSpec says that require and *modules* are deprecated.

But I still see we use require all the time. What should we use?

+6  A: 

They were deprecated long ago. The standard was published in 1994. What were the consequences? None, since no new standard has been published and no new standard is being worked on.

So, if your Common Lisp implementations provide a useful definition and implementation of PROVIDE, REQUIRE and *MODULES*, then use it.

There are other tools that care about loading and creating libraries and applications (usually called 'Systems'). Often these have some kind of interface, so that (REQUIRE 'SOME-SYSTEM) loads that system and so that after loading that system it has been 'provided'.

Rainer Joswig
Thanks a lot. One little question. Isn't it strange that the spec just deprecated something without providing substitutes?
yehnan
@yehnan, sometimes you realize that the functionality described is just not very useful or lacks detail, but there is no will or capability to specify a better one. The standard committee discussed several areas of extensions, but failed, ran out of steam, ran out of money, ran out of interested parties..,
Rainer Joswig
+1  A: 

ASDF seems to be a pretty popular and modern way for loading systems.

to load foo:

(asdf:load-system :foo)

and under ABCL, Clozure CL, CMUCL, ECL and SBCL, it hooks into cl:require. So cl:require seems fine.

Russell