Hacker News new | ask | show | jobs
by Moocar 4547 days ago
I'd highly recommend checking out Stuart Sierra's component library. It's helps define your application into components that manage state and gives you lifecycle control of those components. basically dependency injection for clojure.

https://github.com/stuartsierra/component

1 comments

And his talk on the subject of larger scale clojure programs:

http://www.infoq.com/presentations/Clojure-Large-scale-patte...

These aren't established practices yet. There don't seem to be any. This is not serious criticism, as I'm sure practices will evolve, but I think that currently it is a deficiency in the Clojure ecosystem. Making namespaces more like modules (that can be instantiated and parametrized) might help at the language level.
I'd agree with namespaces-as-modules, it's something that'd make program composition a lot nicer in my opinion.