As they say, (objects|closures) are a poor man's (closures|objects).
The pertinent point is that you don't need runtime typing to implement runtime dispatch. OO languages are based on associating behavior with types when all you need is to associate behavior with values. Or in other words, functions that are first-class values.
<strike>
And I'm thinking the gentleman that answered might actually be the same person as the author.
</strike> ... probably not but the answer reminds me of this article.
It's just pattern matching and lamdbas. In another language you'd probably do the same thing with a map containing commands as keys and lambdas as values.
The pertinent point is that you don't need runtime typing to implement runtime dispatch. OO languages are based on associating behavior with types when all you need is to associate behavior with values. Or in other words, functions that are first-class values.