by keithasaurus · 6y ago · 0 comments
The REPL is relied on because it's useful for exploring parts of a system or program. It's like being able to both dissect and vivisect the system without having to go through all the normal issues of setting up a debugger and instrumentation. The environment and program is just there.
[0] For example:
alias cc import pdb; pdb.disable()
alias ppr pp response.json()The reason the repl is widely used in clojure is because it's the fastest way to get feedback on ridge code.
I draw a sightly superficial line between ridge and dynamic code. Ridge code would be like an API call to get very specific specific results, here the repl is better then a unit test, for it would be too much for code and time to capture your specific API call results, namely because you haven't really tested anything much larger than a couple data points.
So, it's the opposite, unit tests are often used because languages lack a repl.
It's instant. There's no waiting on the startup time here at all, sometimes its so fast I don't believe the tests have actually run (so I break something and change it back to confirm).
It's a very very fast way of developing.
You can see me breaking a test here and fixing it:
https://www.youtube.com/watch?v=XKCZv9YD0KI
The test runner is in the bottom horizontal pane.The tests run instantly.