3 ms·
I think Java programmers (and their buddies in C# and similar land) can benifit from adapting a straight forward functional style of programming. Not the strea
by throwaway4good 6y ago
I think Java programmers (and their buddies in C# and similar land) can benifit from adapting a straight forward functional style of programming.
Not the stream, map, reduce stuff.
But simply writing functions without side-effects and separating data from functions.
"Remember that software is at its core procedural."
That may be true in some sense. But most Java code is in fact not procedural but stateless in the sense that most often state is store in a database or another external system.
- leto_ii 6y agoIsn't this a bit the opposite of what the article is recommending? It seems the author would like full oop, stateful objects etc. Or maybe I got it wrong...
- throwaway4good 6y agoNo. I think you have got it right.
- selfhoster11 6y agoI agree and tend to create my code in this style. The bonus to this style of programming is that testing functions in isolation comes almost for free.
- cies 6y ago> can benifit from adapting a straight forward functional style of programming. Isn't Kotlin largely scratching this itch?
- alenmilk 6y agoTo be more specific, get rid of setters unless it is a data object. Have all fields be final and set them in one constructor. This makes the code more readable since you know no method will change the internal state.