Hacker News new | ask | show | jobs
by leethomas 2207 days 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.

2 comments

There 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).
Sure, 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-r... https://github.com/stuartsierra/component