Re:Functional core, imperative shell (2012)
by monocularvision on Friday September 21, 2018 @08:20PM
(#18043693)
The entire architecture of our iOS app is built around this principle. We have tried to give it a name but keep coming back to “Functional Core, Imperative Shell”. You can find some of the ideas that were implemented here: https://m.youtube.com/watch?v=7AGQ9dhWCX0
[ Parent
| on HN ]
Re:Functional core, imperative shell (2012)
by yoava on Saturday September 22, 2018 @05:41AM
(#18045287)
What you seek is actually something a bit different.
It is the observation that all software is built of 3 layers -
Inbound IO, what you call imperative shell Business logic core, what you call functional core Outbound IO, what you call again imperative shell.
The problem with the terms in functional programming is that when they say side effects, in most cases they mean IO.
The functional core does not have to be functional for you to get the benefits - easy testing, easy to reason about, easy to develop. In fact, in some cases, functional programing is the wrong tool while having a business logic core that is separated from IO is still a very valid architecture.
Re:Functional core, imperative shell (2012)
by nicoburns on Saturday September 22, 2018 @06:32AM
(#18045403)
Generally speaking, I find that it is making the "business core" stateless that has the benefits.