I am new to Common Lisp. This is how I develop programs in other languages, and also how I now develop programs in Common Lisp:
- Open a text editor (e.g. vim or emacs) to create/edit a text file.
- Write source code into the text file. (If unsure about the behavior of a snippet of code, and an REPL is available, then evaluate the snippet in the REPL, verify that the snippet evaluates as expected, and then go back to writing more code.)
- Save the text file.
- Ask the compiler/interpreter to load and run the source code in the text file. (e.g.
sbcl --script myprog.lisp
) - Go to step 1 if needed.
This is the conventional write-compile-run development cycle for most programming languages. However, in the lisp world, I hear things like "interactive development" and "image-based development", and I feel that I am missing out on an important feature of Common Lisp. How do I do "image-based development" instead of "write-compile-run development"?
Can someone provide a step-by-step example of "image-based development" similar to how I described "write-compile-run development" above?
(Note: I am using SBCL)