|
|
|
|
|
by Plugawy
2165 days ago
|
|
The closest thing you can get in irb, is to use Rails' `reload!` after making changes to your files. I don't remember if irb supports this kind of stuff out of the box, perhaps good old `require` works. Differences: - Clojure has namespaces, so you can reload just one unit rather than the whole code - I guess load/require would be closest
- You can also just evaluate a single form (e.g. a function definition) leaving everything else intact
- if you're using something like Component for state management, then you never restart the repl, just stop the system, refresh your repl state and start the system again - closest thing to 'refresh on request' from Rails' dev mode or PHP, but without the nasty surprises The drawback is that restarting a repl is a slow process, but it's something you do very rarely. Some folks keep their repl process around for weeks. |
|