Agree on TDD. I think it is less needed when you have a REPL like Clojure’s. However, I use it to some extent together with the REPL. A bit like so:
- Hack in a
commentform until I have an idea what function(s) to write/how to write it. - Write a little of the function.
- Write some code in a
commentform testing the new version of the function. - Possibly repeat 2 and 3 until it works.
- When it works, consider adding some of the testing code in
:testof the function meta data. - Run tests for current function. This probably just works, but if not, go to 1 or 2 (depends).
- Go to 1 until done.
(I do not use the REPL prompt very much.)
Step 5 and 6 helps me improve my testbed and is why I think about it as TDD. REPL improved TDD, maybe? 