3 ms·
Fascinating. This is how I build my programs. I never knew it had a particular name for the style. I just assumed it was functional-style programming. This all
by blackrock 6y ago
Fascinating. This is how I build my programs. I never knew it had a particular name for the style. I just assumed it was functional-style programming.
This allows me to build ever greater programs, that does very complicated things, and has thousands of lines of code and logic, but everything gets boiled down to small bite-sized pieces.
It’s a more data oriented approach. And it seems to follow an assembly line model.
I liken it to building code pyramids. Where I keep stacking and chaining one function to another, to build even bigger pyramids.
At the end, all the code is heavily unit tested, and I have a high degree of trust in the fidelity of the codebase.
- 0x445442 6y agoYeah, when Java 8 introduced the Function interface I started to program this way as well. I get push back some times from the those not initiated to the functional style because I have a ton of little function that do one thing. Unfortunately in Java this means a bunch of class files. The other thing I noticed when I started using this style is that I was able to ditch unit testing mocking frameworks. This made me realize, when the Function interface was introduce it was a backdoor way to get folks back to coding to an interface, which we should have been doing all along.