How useful the REPL is depends on the language. Some languages have a much richer REPL related toolset than others. I'm guessing your experience with REPLs has been with a language such as Python or Ruby which doesn't have a very rich toolset. I agree that in these languages the REPL is mostly useful for trying stuff out. However, if you try some thing like Lisp with SLIME then you will see a very different experience. In SLIME, the REPL lets you interact with your running application. This lets you query/modify the runtime state. This, combined with the ability to hot swap your code, gives you nearly instant feedback for anything you develop.
SLIME gives you some ability to save REPL state in that you can start a REPL with all of your code already loaded (check out the Clojure bulid tool Leiningen and the command 'lein swank'). If you want to save the complete state of a running application you could check out one of the versions of Lisp with image based persistence or Smalltalk.
This has been discussed a fair amount, as well as replaying session transcripts, persisting key data structures easily, some other things i can't remember.
If I wanted to use other versions of Lisp, I would be using them. For my environment (lots of legacy java code) clojure is the right language, and I can't reasonably change to Haskell or Scheme (or whatever) because working from files is a little bit inconvenient.
My point was I hear people gushing about the REPL, but I don't find it that useful because of this one deficiency. It makes me wonder if I'm missing something.
Comments
How useful the REPL is depends on the language. Some languages have a much richer REPL related toolset than others. I'm guessing your experience with REPLs has been with a language such as Python or Ruby which doesn't have a very rich toolset. I agree that in these languages the REPL is mostly useful for trying stuff out. However, if you try some thing like Lisp with SLIME then you will see a very different experience. In SLIME, the REPL lets you interact with your running application. This lets you query/modify the runtime state. This, combined with the ability to hot swap your code, gives you nearly instant feedback for anything you develop.
SLIME gives you some ability to save REPL state in that you can start a REPL with all of your code already loaded (check out the Clojure bulid tool Leiningen and the command 'lein swank'). If you want to save the complete state of a running application you could check out one of the versions of Lisp with image based persistence or Smalltalk.
This has been discussed a fair amount, as well as replaying session transcripts, persisting key data structures easily, some other things i can't remember.
http://groups.google.com/group/clojure/browse_thread/thread/...
http://groups.google.com/group/clojure/browse_frm/thread/473...
http://stackoverflow.com/questions/3480377/clojure-namespace...
http://clojure-log.n01se.net/date/2010-01-16.html#i75
If I wanted to use other versions of Lisp, I would be using them. For my environment (lots of legacy java code) clojure is the right language, and I can't reasonably change to Haskell or Scheme (or whatever) because working from files is a little bit inconvenient.
My point was I hear people gushing about the REPL, but I don't find it that useful because of this one deficiency. It makes me wonder if I'm missing something.