Hacker News new | ask | show | jobs
by AlexanderDhoore 2210 days ago
It's code and state. Nothing more. Nothing less.
2 comments

My first computer book was: “Data Structures + Algorithms = Programs”. Thinking in this way has simplified my code tremendously. I think OO is taught because it’s more tactile. Literally it takes more keystrokes, and so much is pattern repetition that it facilitates learning and feels like progress. Functional is like learning Latin by studying Ovid one word at a time. When books (or mips) were expensive, this was how it was done. Even OO is old-school now though; today’s introduction to programming is mostly configuring CSS and webpack.
OO is just the most intuitive way to compartmentalize state to many people, me included.
I feel the same way.
How do you model changes in state over time? (i.e. effects and processes?)
Is this a trick question? You mutate the state, of course.