7 Application Delivery

Delivering self-contained Lisp applications (whether as executables, or as scripts) is a concern beyond the ANSI standard, and is implemented differently by each and every Lisp vendor. In theory, Clon should have nothing to do with it; it’s just a library that you might want to use in order to process the command-line. Unfortunately (and precisely because of the lack of standardization), there are some non-orthogonal concerns that need to be dealt with carefully for Clon to work properly in all situations.

The following sections provide some important information regarding the use of Clon in standalone executables, or in regular interactive Lisp images. Before going into the details, let me first introduce the executablep function, a predicate that returns t when called from a standalone executable. You may find this function useful, for example in order to write portable code deciding on whether or not to quit your application at the end of Clon’s main function. You’d quit a dumped executable, but you’d continue to a REPL in an interactive variation.