3 ms·
Debuggers are not a replacement for REPLs. The magic of the repl is to be able to recompile and reload exactly one function or form, for instance. Even if it is
by emmanueloga_ 7y ago
Debuggers are not a replacement for REPLs. The magic of the repl is to be able to recompile and reload exactly one function or form, for instance. Even if it is really fast most JavaScript setups require recompiling a whole file and likely reloading the whole page to test.
Clojure also has debuggers: you can debug from either Cider or Cursive, for instance. I'm not that familiar with debugging outside of those two though.
- girvo 7y ago> most JavaScript setups require recompiling a whole file and likely reloading the whole page to test With most setups nowadays (create-react-app/Webpack, Parcel, etc.) and "hot-module reloading" that's no longer really the case... ...but that doesn't take away from your point, because it can have some truly odd effects on the debugger haha
- iLemming 7y ago> Debuggers are not a replacement for REPLs. Nothing is a replacement for a good, "true" REPL. Being able to evaluate any [sub]expression, without any kind of ceremony, anytime, from anywhere in your code is incredibly liberating. Who never used Lisp seriously, would never understand how amazing that workflow is. I think REPL is the main reason why we still have Lisp dialects. After over six decades Lisp is still alive and thriving.
- emmanueloga_ 7y agoTrue! For a long time I was looking for the mythical "livecoding" setup, thinking some experimental programming language was needed or something, when all the while Clojure was there, just waiting for me :-) In that way I feel Clojure's defaults to immutability go a step beyond what's offered in most Lisp's setups. Not everything "just works" though, thought is still needed in order to have certain things be easily reloadable. I'm talking things like using "defonce" forms and having a setup like described here [1]. I'm still exploring this space but I think the gist of it is to create a direct acyclic graph of dependencies, so you can start and stop exactly what you need, not unlike what build systems do. 1: https://lambdaisland.com/blog/2018-02-09-reloading-woes https://lambdaisland.com/blog/2018-02-09-reloading-woes