Re:The Repeated Deaths of OOP (2015)
by kaba0 on Sunday June 06, 2021 @01:18PM
(#27414612)
In your first paragraph you have examples where you are indeed the actor. In the case of the coffee machine though, you are only the actor initiating an action (eg. the main method calling a given CoffeeMachine’s createCoffee method). And here is the great thing about OOP, you don’t have to know what exactly happens inside the machine, the way it heats up water, grinds coffee beans, etc, you only know what result you want and how to initiate an action, everything else is the responsibility of the machine.
And frankly, I don’t see the divide between “data structures and how we operate on them” vs OOP. They are not mutually exclusive. Some problems are data-first, others are behavior-first — so just be familiar with both and use the correct tool for the problem.
And frankly, I don’t see the divide between “data structures and how we operate on them” vs OOP. They are not mutually exclusive. Some problems are data-first, others are behavior-first — so just be familiar with both and use the correct tool for the problem.