Questions tagged [multiple-dispatch]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
85 views

Does this architectural design “smell” like Service Locator and can this be dealt with in a more robust manner?

I have an architecture based on a domain with multiple object types. These objects (many and of disparate types) must reside together with each other because they make up a use-case. The types are not ...
7
votes
1answer
297 views

How to tackle extensibility considering the Data/Object Anti-Symmetry?

In Clean Code by Uncle Bob, page 124-125 he states Procedural code (code using data structures) makes it easy to add new functions without changing the existing data structures. OO code, on the ...
2
votes
2answers
213 views

Strategy for implementing Multiple Dispatch

This is a question regarding how Multiple Dispatch works. Suppose that we have a type hierarchy like this: Drawable -> Shape -> Polygon -> Rectangle And there are three functions (This is ...
6
votes
3answers
576 views

Understanding Multiple Dispatch

I've been reading around trying to understand multiple dispatching, and why it's so special. On Wikipedia I came across this simple example: (defmethod collide-with ((x asteroid) (y asteroid)) ;;...
14
votes
1answer
3k views

Multiple Dispatch vs. Function Overloading

I'm trying to understand the difference (if any) between the two. According to the Wikipedia page for Multiple Dispatch it is synonymous with Function Overloading, but then later on goes on to say: ...