3 ms·
In this screencast we look at one method for crossing this divide. We review a Twitter client whose core is functional: managing tweets, syncing timelines to in
by usrbinbash 5y ago
In this screencast we look at one method for crossing this divide. We review a Twitter client whose core is functional: managing tweets, syncing timelines to incoming Twitter API data, remembering cursor positions within the tweet list, and rendering tweets to text for display. This functional core is surrounded by a shell of imperative code: it manipulates stdin, stdout, the database, and the network, all based on values produced by the functional core.
To me, that sounds how basically every procedural codebase operates: You have an interface, eg. ORM layer & connection handlers to connect a core of functions between which data flows on its way in or out.
So yes to all 3 questions as far as I'm concerned. Almost every program before and after the OOP hype was and is written in this manner.
The reason why I think this seems like a new concept to many people, is because the world is still coming down from the aforementioned hype when everything and the kitchen sink was supposed to be an object, and handling things by passing data between freestanding functions was seen as a big nono for some reason.
- dennisy 5y agoIf yes to all 3 I would love references as that was the sole point of this post.