3 ms·
It may not feel like it, but that is pretty much what languages like Java do. At run time, the type of the receiver is evaluated and the correct method is selec
by rapala 15y ago
It may not feel like it, but that is pretty much what languages like Java do. At run time, the type of the receiver is evaluated and the correct method is selected based on that. So we have the dispatch function, and a way to map results of that dispatch function to action functions. The only difference is that because of static typing, we cannot extend the <dispatch value, action function> map at run time, because we cannot create types at run time.