3 ms·
> functional-core/imperative-shell Lol I’ve been learning Clojure for fun these last few days and I had to read this twice because the first time I thought I w
by leethomas 6y ago
> functional-core/imperative-shell
Lol I’ve been learning Clojure for fun these last few days and I had to read this twice because the first time I thought I was looking at a function from a module.
> we can deal with state and I/O with other constructs, like atoms and records
Can you elaborate on what you mean here or link to specific articles? I’m talking about the representing I/O side effects as records part.
- roguas 6y agoThere is a component framework that builds dependency tree for stateful modules and does implicit injection of params. It is a beautified pattern(usually you can do initializations in higher levels, but you have to resolve dependiences yourself and for the whole tree) for dealing with things that require state while keeping explicit references(so that you understand where it came from and can inspect(visually) its lifecycle).
- rafaelferreira 6y agoSure, check out Stuart Sierra' (by now famous) blog post Clojure Workflow Reloaded and his Components library: http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-r... https://github.com/stuartsierra/component https://github.com/stuartsierra/component