3 ms·
I think it needs to be thought of as part of an overarching design - again, see Gary Bernhardt. A pure functional core that can be unit tested against, where th
by m_mueller 6y ago
I think it needs to be thought of as part of an overarching design - again, see Gary Bernhardt. A pure functional core that can be unit tested against, where the tricky logic happens. And a shell where you deal with dirty but dumb things like thread pools, logging, error handling, non-pure libraries etc. And then just be very diligent to separate concerns, i.e. don't put too many smart things into the shell.
- travv0 6y ago"Functional core, imperative shell" is exactly what IO in the Haskell type system enforces.
- lmm 6y ago> I think it needs to be thought of as part of an overarching design Right. Which is very much opposed to your initial "FP is a tool, not a unified theory on how to model the world".
- m_mueller 6y agoI don’t think it is? I don’t see the contradiction. My point is FP, imperative and OOP can be combined effectively in one architecture.
- lmm 6y agoThey can be, but you need to adopt a particular global perspective/worldview to make it work. Treating FP as just a tool in the toolbox that you can use ad-hoc anywhere in the codebase is not effective.