开发者

require and *modules* are deprecated in common lisp?

Common Lisp HyperSpec says that require and ****modul开发者_开发技巧es**** are deprecated.

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


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'.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜