2 ms·
Yeah but you don't need OOP to do that. See opaque pointer's in a number of non OOP languages.
by Gibbon1 6y ago
Yeah but you don't need OOP to do that. See opaque pointer's in a number of non OOP languages.
- augustk 6y agoThese are called Abstract Data Types.
- garethjrowlands 6y agoThis paper describes the differences between objects and ADTs, https://www.cs.utexas.edu/users/wcook/papers/OOPvsADT/CookOOPvsADT90.pdf https://www.cs.utexas.edu/users/wcook/papers/OOPvsADT/CookOO...
- billisonline 6y agoYou don't need OOP to do anything! But in the state machine example, it provides a coherent and readily understandable metaphor (object modifies its own private state; callers can tell it what to do but not how) for the task at hand. Isn't that the goal of a programming paradigm?