But REPL development is a mixed blessing. There are many situations where you want to start from a blank slate with no previous state.
LISP would be a more practical language if it included a trivial option to make that possible.
But REPL development is a mixed blessing. There are many situations where you want to start from a blank slate with no previous state.
LISP would be a more practical language if it included a trivial option to make that possible.
If you're using SLIME: M-x restart-inferior-lisp
E.g. code that accesses an optional property as if it was always present, because it happens to be present when you're writng the code, etc.
That seems like a possible pitfall when relying on a REPL heavily, but I haven't used such a language myself, so can't speak from experience.
Any time writing code, you (should) aim for the general situation and then test it with whatever edge-cases you think of at the time. The REPL lets you live-test. I know many people who dump their REPL history to a file and turn them into tests.
And I wonder whether someone observed that in practice.
I've not personally observed that, fwiw.
For individual tests, say for coverage, these should also be generated automatically if possible, say by looking for inputs that kill mutants. I've backburned a Common Lisp system for doing this, generating mutants from Common Lisp source forms and automatically searching for and minimizing inputs that kill new mutants. Maybe one day I'll finish this and put it out there for general use.
M-x slime-restart-inferior-lisp
works fine.