|
|
|
|
|
by twh270
2293 days ago
|
|
OOP as realized by the languages in common use is a bit of a disaster. What was originally conceived as message passing[1] is actually implemented by OO languages as passing around pointers to objects that have mutable state, so in effect, every object is potentially part of global shared state. Inheritance is a confused mess of "is-a" semantics, type system behavior, and code/state sharing in a set of subclasses. I'm often somewhat amazed that we can build working large-scale systems at all in these languages given their weaknesses and the knowledge/skill level of the average programmer. One source for what OOP was meant to be is https://wiki.c2.com/?AlanKaysDefinitionOfObjectOriented. That article links to others, and you can follow quite a rabbit trail of "what OOP is" threads. |
|
I saw a Pharo (smalltalk) demo recently, the damn thing was so slow to react I thought it was a bad joke. Can't even begin to imagine what actual message passing would look like - oh wait, I do actually know due to spending 6 hours last weekend finding why a software had uncomfortable mouse interaction, actually caused by fucking objc_msgSend making everything async and slow on that wretched Apple OS.