On Thu, 30 Aug 2001, Damian Conway wrote:

>    > Even if the dispatcher is the heart of multimethods, perhaps it
>    > would be nice if it were convenient to replace the dispatcher
>    > in whole or part.
> 
> I'm sure if we asked Dan nicely, he'd consider hanging the dispatcher on
> a lexically-scoped hook to make that possible ;-)

I'd planned on making the dispatch one of the vtable methods for
variables, so you could override it on a per-class or per-object basis if
you wanted. (Most people, I expect, will choose one of the standard
dispatchers, and there will probably be two or three)

I hadn't considered having it as a global thing, just because I can see
class Foo wanting multimethods, and class Bar being fine with 'normal'
class hierarchy walking, and class Baz deciding it wants the automatic
redispatch form of method calling.

We could make it a global thing and have only a single way to dispatch, in
which case it would be lexically overridable, but that seems awfully
limiting...

                                        Dan

Reply via email to