4 ms·
> What can you do with a closure? You can call it. What can you do with an object? You can not call it. You can only call one of its methods. These are congrue
by inopinatus 4y ago
> What can you do with a closure? You can call it. What can you do with an object? You can not call it. You can only call one of its methods.
These are congruent, assuming an Alan Kay-ish definition of OOP (as per Smalltalk and Ruby et al). A collaborator object does not call another object's methods, but rather sends it a message. Consequently, there is only one logical interface.
This is one reason that Erlang is sometimes described as one of the most OOP languages, despite possessing distinctly functional fundamentals.