3 ms·
I think one important difference is that if you call a method, things fail when the method doesn't exist, or the wrong arguments are passed. With message passi
by mercer 6y ago
I think one important difference is that if you call a method, things fail when the method doesn't exist, or the wrong arguments are passed.
With message passing, the callee can decide not to respond to a message. Or to respond at a later time.
In a broader sense, I'd say the difference is between pressing a button on a robot that 'forces' it to walk, or asking said robot to please go and walk. In the former case, you're essentially reaching 'into' the robot's behavior via an exposed control. The caller is in charge. In the latter case you have no control and the callee, the robot, has the freedom to decide what to do and when to do it.