That's not how it works. Multiple dispatch looks like a normal procedure call, it would look like
cast(item, user)
or if you need to know it was raining cast(item, user, worldstate)That's not how it works. Multiple dispatch looks like a normal procedure call, it would look like
cast(item, user)
or if you need to know it was raining cast(item, user, worldstate)Or, as I sometimes think of it, it can be an OOP design if multiple dispatch is actually a set of messages supported by an implicit, singleton, and usually hidden, “multiple dispatch“ object that handles the dispatch logic. You don’t have to write “dispatcher.cast(a, b, c)” but that is because the language provides the syntactic sugar (and often, an efficient implementation).
I dunno. From https://en.wikipedia.org/wiki/Multiple_dispatch
"Multiple dispatch or multimethods is a feature of some programming languages in which a function or method can be dynamically dispatched based on the run-time (dynamic) type or, in the more general case, some other attribute of more than one of its arguments.[1] This is a generalization of single-dispatch polymorphism [...]"
It's just a nicer OOP to me. *shrug* But thanks.