|
|
|
|
|
by DonHopkins
2584 days ago
|
|
I think there's a big difference between not understanding the message, and not understanding the data (a message parameter). When they get an unrecognized message, Objective C objects call their doesNotRecognizeSelector method, and Smalltalk objects call their doesNotUnderstand method. And the object sending the message can first check with respondsToSelector in Objective C or respondsTo in Smalltalk, before sending the message. But validating and sanitizing input parameters is a totally different thing than handling unknown messages, orthogonal to object oriented programming. |
|
Objects and messages are kinds of types. Types can have constraints and conditions and there is all sorts of nuance.
Difference, yes. But completely different? No... when designing a system there is a lot of freedom in where to draw the shapes of the system, how much information do we contain in the objects themselves, a hierarchy or inside parameters.
"Stringy interfaces" is one extreme. There are many others.