4 ms·
The REPL in Clojure (and other Lisps) is far more tightly integrated with your editor environment. When I wrote python, I would do what you're describing: test
by lvh 6y ago
The REPL in Clojure (and other Lisps) is far more tightly integrated with your editor environment. When I wrote python, I would do what you're describing: test something in (i)python, write some code, rinse, repeat. With Clojure, I Write said experiments in the same place my code already is (and will end up). Making that feedback loop 10x tighter makes a world of difference in UX: I don't think it helps insight to equate "typing things in irb" with "mashing C-x C-e until the expr does what you want".
(I have no idea if an equivalent workflow exists in Elxir, but I've never seen it been done that way: just like people use ipython, they use iex in my experience.)
- regulation_d 6y agoA pretty common pattern I've seen in both Ruby and Elixir is to begin building up the state you want to work with in a test and then drop into a repl using pry (either adding a breakpoint in the code or in the test). I think this allows you to "Write said experiments in the same place [your] code already is". Maybe I'm just misunderstanding what people in Clojure are doing. Please feel to point me in the right direction.