|Version 1 (modified by bfulgham, 9 years ago) (diff)|
Building Large Projects
Lisp is very similar to languages like Java, C++, and Python in that a program (of any size) is typically broken down into individual compilation units that are stored as separate text files, usually with an extension such as lisp, lsp, or cl. The one example of this that comes with the OpenMCL distribution is in "ccl:examples;cocoa-application.lisp", which creates a double-clickable GUI application.
In practice, people often make "applications" by simply passing a few --load and/or --eval arguments on the command line. It's also possible to load application-specific code into a running lisp and then save a memory image via the function CCL:SAVE-APPLICATION (possibly specifying that that application do something other than start a REPL when it's invoked.) In a lot of cases, which general approach is better may depend on how long-lived the application is (it might be harder to debug something built with SAVE-APPLICATION.)
Some people use make to build lisp applications; it's sometimes preferable to use lisp-specific system construction tools (such as DEFSYSTEM and ASDF). A lot of modern freely-available lisp packages (things that one might find on common-lisp.net or via cliki.net) are intended to be built with ASDF; they're typically distributed with .asd files which serve a similar role to Makefiles in C packages.