3 ms·
While the explanation was a little wordy, it really helped me visualize what was happening — particular the image with cross-links, and the two different kinds
by ssivark 6y ago
While the explanation was a little wordy, it really helped me visualize what was happening — particular the image with cross-links, and the two different kinds of table of contents.
Now I see that the essence of the concept relates to the semantics of “categories” (mutually exclusive, collectively exhaustive) -vs- “tags”, especially when there might be multiple ways to split the domain into categories (especially when they fill out an incomplete/sparse subset of the full Cartesian product). Conventional dispatch (presumably implementation in the language?) is based on one of either functions/types as categories, while multiple dispatch uses all of these inputs as tags to specialize on the appropriate implementation.
If this perspective is correct, I would like to understand why/how the implementation conventional languages forced them into category-based single dispatch.
Thanks for a nice article :-)
- leephillips 6y agoInteresting perspective. Reminds me of how trying to index the web using categories and hierarchies gave way to search using keywords. Similar with email interfaces.
- elcritch 6y agoMany older languages don’t, Common Lisp, Erlang, and even C++ templates have multiple dispatch or similar. Object oriented languages however largely use single dispatch due to being focused on objects and the implementation usage of vtables which work on a single object, as in C++/Java/Python.