4 ms·
You do generalize everything but its not overwhelming bc there is nearly zero friction to writing and using a library. It has to do with the ergonomics of the l
by geokon 2y ago
You do generalize everything but its not overwhelming bc there is nearly zero friction to writing and using a library. It has to do with the ergonomics of the language you're using though. In Clojure you just point to the lib directory in your 'deps.edn' and then use the namespace locally. It essentially doesn't require any additional work - except you do need to decouple the code (which is good anyway)
The only extra work is you need to write a 'deps.edn' file for each mini-libs to specify its dependencies, but that take 5 seconds to do.
Lots of your mini libraries end up being just a handful of "helper" functions that for instance wrap some 3rd party lib. I find I reuse them later in other projects all the time