4 ms·
> You don't need OO for state management. Of course you don't, that's why I said OO is most likely the way to go. I also spoke of more than simple state manag
by taylodl 2y ago
> You don't need OO for state management.
Of course you don't, that's why I said OO is most likely the way to go.
I also spoke of more than simple state management - If you're modeling a system having several interacting entities whose interactions may vary based off that entity's current state - isn't simple state management.
You still don't have to go OO to solve that problem, it's just a very good choice in most circumstances.
Also, inheritance is not a core aspect of OO. It's a common aspect of OO and even a popular aspect, but it's not core. To wit, there are OO systems not having inheritance.
- lispm 2y ago> not a core aspect of OO One of the core aspects of OO is reuse of functionality, typically by inheritance or delegation. We can find one or both in most OO languages.
- taylodl 2y agoI wouldn't say reuse of functionality is a core aspect of OO, but I will say that's a core reason why OO was so heavily adopted in the 90s. It's mind-numbing to recall how much time and money was wasted on making things "reusable" only to never be reused.
- lispm 2y ago> I wouldn't say reuse of functionality is a core aspect of OO You'll find it in practically every object-oriented language, starting with Simula. Later Smalltalk, Actors, CLOS, C++, Self, Java, Objective-C, Python, JavaScript, ... > making things "reusable" only to never be reused. It's similar mind-numbing how much has been reused.
- taylodl 2y ago> It's similar mind-numbing how much has been reused. My experience is the reuse comes from frameworks. I'd love to hear if you've had another experience.
- lispm 2y agoYes, there are a bunch of frameworks, which make use of inheritance and/or delegation. Flavors (an early object-oriented system for Lisp, early 80s) provided multiple-inheritance, mixins, method combinations, etc. and a bunch of software made use of its features. Object Lisp was another OO system for Lisp, which one used for example in an interface builder, which made extensive use of delegation. The Common Lisp Object System later was designed improving on Flavors and LOOPS (from Xerox), switching away from message passing, adding multiple dispatch. Thus dispatch based on inheritance works over possibly multiple arguments. Inheritance and delegation have a long history in Lisp going back to the 70s.
- dunefox 2y ago> I wouldn't say reuse of functionality is a core aspect of OO, That's what was taught to me in computer science at university, along with Java (sadly).