by dgb23 · 4y ago · 0 comments
- principle of least power
- can often be talked and reasoned about more easily
- lends itself to visualization
- can be tested more easily and uniformly
- eliminates certain classes of accidental complexity
So yes it makes sense to use...
- relational algebra for data manipulation where feasible, functional programming for the rest
- (data driven / functional) state machines for control
...like the article is suggesting. I also kind of like the idea about I/O but I'm not 100% sure there, because I never played with such a system. Reactive programming is powerful too to manage data flow and again hides away plumbing and side-effects.
In a sense this is kind of already how many are programming in modern FP languages like Clojure (via libraries).
What we possibly lose with these approaches is performance, except the runtime/macros are fine tuned to make automatic optimizations, so some of that can be gained back in the long term. But I generally agree that there is tons of leverage in programming these things at a higher level.
Based on exactly this arguments that we created HerbsJS [1], a domain-first library to build microservices. While the essential complexity can't be removed [2], we should put effort to remove the accidental complexity as much as possible.
BTW, great to see this kind of discussion here and congratulations to the team responsible for Cell Lang.
Would you have links about this programming style and some of these libraries?
This is something that becomes very obvious when you become more familiar with fp. Yet it was the most surprising/eye opening thing when you are not.