There are various situations you get into in Clojure where the easy way out is "just restart the REPL." This is unfortunate, because
- startup time is slow
- often REPLs have a ton of useful context built up
I believe these problems could be entirely solved in a contrib library of helper functions for REPL development. This a significantly better than making changes to Clojure, which must pass a high bar and be carefully assessed for possible affects on exiting code. It is also consistent with Rich's desire to more clearly delineate development vs. production functionality.
Some of problems to be solved (please add to these):
- reloading of multimethods
- reloading of records/types that implement a protocol
- removal of "dead" vars
- destroying/recreating stateful objects (threads, sockets, files, etc.)
- tools.namespace contrib library handles reloading at the namespace level and ensures correct reload order by statically examining namespace dependencies. Also removes "dead" Vars that have been deleted from source files.