3 ms·
The tools exist for the low-level work of refactoring, i.e. emacs and clj-refactor. For larger structural changes, however, I've found core.typed has paid off.
by thom 11y ago
The tools exist for the low-level work of refactoring, i.e. emacs and clj-refactor. For larger structural changes, however, I've found core.typed has paid off. Obviously some people have a visceral reaction to type systems, but even if you don't use it at the outset, the ability to gradually add type information to existing code is great for paving the way for larger refactorings.
The workflow I have grown to love in clojure is an initial freewheeling, REPL-driven, dynamically typed phase in which you explore the problem you're working on, followed by a period of stabilisation that results in nicely factored, mostly-typed code. I personally think this can often give you the best of both worlds - quickly find the right design for a feature using clojure as a dynamic language, then robustly integrate it with the rest of your project using clojure more statically.