quotes
defparameter vs defvar
I finally got it, thanks to Peter Norvig’s definition in PAIP (maybe taken from elsewhere).
Parameter is something, on which the programs behavior depends (like on a change of source code), so it’s change will be visible in recompilation. Var is just a special variable.
In general, there are six maxims that every programmer should follow:
- Be specific.
- Use abstractions.
- Be concise.
- Use the provided tools.
- Don’t be obscure.
- Be consistent.
Two Paths to Follow
The two versions of the preceding program represent two alternate approaches that come up time and time again in developing programs: (1) Use the most straightforward mapping of the problem description directly into Lisp code. (2) Use the most natural notation available to solve the problem, and then worry about writing an interpreter for that notation.
Approach (2) involves an extra step, and thus is more work for small problems. However, programs that use this approach are often easier to modify and expand. This is especially true in a domain where there is a lot of data to account for. The grammar of natural language is one such domain-in fact, most A1 problems fit this description. The idea behind approach (2) is to work with the problem as much as possible in its own terms, and to minimize the part of the solution that is written directly in Lisp.
Norvig, PAIP