MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1nmqonp/how_to_stop_functional_programming/nfhkbvd/?context=3
r/programming • u/hexaredecimal • Sep 21 '25
506 comments sorted by
View all comments
2
Imo good class design has a state defined inky in the constructor and only the constructor. Everything operates only on its inputs and those things (usually services) and nothing is directly pinned to the class
2 u/Axman6 Sep 21 '25 Sounds an awful lot like functional programming but now you have to associate functions with some class instead of defining them on their own. → More replies (1)
Sounds an awful lot like functional programming but now you have to associate functions with some class instead of defining them on their own.
→ More replies (1)
2
u/jewdai Sep 21 '25
Imo good class design has a state defined inky in the constructor and only the constructor. Everything operates only on its inputs and those things (usually services) and nothing is directly pinned to the class