4 ms·
Every OO proponent seems to have their own definition of OO. Another I’ve heard is “message passing”, although that one even has many different flavors since it
by throwaway894345 5y ago
Every OO proponent seems to have their own definition of OO. Another I’ve heard is “message passing”, although that one even has many different flavors since it isn’t well defined and some argue that methods constitute message passing and others envision something closer to an Actor model.
This is all well and good as long as people are clear about what their definition is (although it is weird how many proponents have wildly different definitions and yet still seem to feel some kind of kinship). The maddening folks are those who deflect all criticism of OOP by saying “that’s not true OOP without ever asserting any particular definitional qualities. These people seem to have an undying love for the sequence of letters O-O-P. So we have these weird conversations where I say, “fine, I contend that anything that might make OOP unique from other paradigms (e.g., inheritance) is a misfeature”.
- cout 5y agoThe concept of a message is older than the actor model, so I don't think it can be considered a fundamental part of the definition of a message (so Smalltalk-style messages are still messages). I do think the Actor model is the most ideal form of message-passing in a single-process system, and seems to be the direction many languages are heading toward as they evolve.
- throwaway894345 5y agoTo be clear, I’m saying “something like the actor model”, not the actor model specifically, though I assume the actor model also satisfies even the narrower definitions of message passing.
- Rochus 5y ago> The concept of a message is older than the actor model Publications by Hewitt or Sussman in the seventies even suggest that the concept traces back to lambda calculus. > so Smalltalk-style messages are still messages Only Smalltalk-72 had true "message passing" (i.e. arbitrary tokens sent to an object for interpretation); Smalltalk-76 onwards uses a virtual methods implementation similar to the one of Simula 67 or C++ instead.
- ProfHewitt 5y agoThe tokens in Smalltalk-72 were not "messages" to Actors where whole messages are Actors. Since Actors are universal primitives of digital computation, it is possible to reframe all previous work as using messages, including Turing Machines and the lambda calculus. Lambda calculus was originally defined using string substitution. Both lambda calculus and Turing machines are computationally less powerful than Actors.
- aliasEli 5y ago> Both lambda calculus and Turing machines are computationally less powerful than Actors. Do you have a reference for that?
- ProfHewitt 5y agoSee the following article: https://papers.ssrn.com/abstract=3603021 https://papers.ssrn.com/abstract=3603021
- bookofsand 5y agoFor yet another definition, OO is about encapsulated polymorphic interfaces. Which raises a communication difficulty: encapsulated polymorphic interfaces are very useful in some of the cases (ADTs, modules), and a misfeature for the other cases (data modeling). I have yet to see a conversation, especially an internet conversation, where participants reach a rough consensus on the contextualized upsides / downsides of a given concept. It's either 100% heaven or 100% hell.
- jasperry 5y agoDo you have any references with detailed analysis of this issue? How much one should emphasize concrete data types vs. interfaces seems like a key consideration in language design.
- ncmncm 5y agoUse it where it's useful, use something else otherwise. It doesn't need much discussion. If your language forces you to use mechanisms and organization inappropriate to the problem, the solution will be ugly and awkward. In that case a better language, or more usually a better job, is in order. The requirements might dictate the language, but they don't typically dictate you being the one to do it.