On Monday, 25 August 2014 at 08:45:15 UTC, Ola Fosheim Grøstad
wrote:
However, why do you want multiple dispatch? I cannot think of any application level use scenario where you have two class hierarchies that you have no control over. So I don't really see the value of multiple dispatch in a system level programming language. Perhaps if you want to use D for an application level DSL? What are the use scenarios you guys have experience with where multiple dispatch was indispensable?

Ola.

Well there are a few go-to use-cases, the handling of collisions
between objects in a game-engine being the most well-known (which
requires Double-Dispatch). But it's basically anything that
requires the Visitor Pattern, plus extra.

At the end of the day, most (if not all) of the major software
patterns have come about and are used due to shortfalls in the
major languages. D, at least in my experience, tends to solve a
lot of these shortfalls, and given that design path, why
*wouldn't* we want Multiple Dispatch in the language?

Reply via email to