Fork me on GitHub
Shantanu Kumar20:10:50

Hi, does anybody know of a non-trivial Clojure codebase implemented using the “Functional Core, Imperative Shell” approach?

Jivago Alves01:10:21

@U066J7E2U I talked about it (between other things) in this presentation . The example I used is very simple but I was hoping to make it simpler to grasp the idea. Code is at Hope it's helpful.


I would say that any Re-frame code base would approximate this paradigm quite well.


That basically is the paradigm of Re-frame.


I don't remember if it's spelled, but it's the same thing

Shantanu Kumar08:10:50

@U4P4NREBY @U8ZE1VBSS You mean, FRP is much like FC-IS?


my post is not about re-frame or FRP, it's about a presentation on how the functinal-core/imperative-shell (or "clean architecture") can be implemented, starting with clojure-spec in the center to define the domain, out to the supporting services that cause side-effects. ..still, not an actual non-trivial Clojure codebase - thought, tbh, I would be interested in that in any language


I didn’t mention FRP, I mentioned Re-frame…? I guess it has elements of FRP too, but I don’t see how that is relevant here. The thing Re-frame does well is nudging developers to mostly use pure functions for almost all application logic (events) and prefer dumb presentation components (form-1 reagent components). All side-effecting code is isolated into effects and all input that is not under your control is isolated into coeffects. The rest of a Re-frame codebase is pure.

Shantanu Kumar08:10:30

@U8ZE1VBSS @U4P4NREBY Thank for clarifying - I don’t have much exposure to Reframe. Will go through the linked resources.

Shantanu Kumar21:11:04

I found it interesting where the speaker talks about moving between effects and normal (pure) worlds:;t=1624s

👍 6