Re: Keyword Arguments

Alexander Shpilkin <[email protected]> Sat, 23 Jun 2012 02:16:55 +0400
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
On Fri, 2012-06-15 at 15:59 -0700, Steve Dekorte wrote:

> Multiple dispatch makes the deep assumption that a notion of external
> type exists. But what notion of type can deal with something like a
> proxy which is, in effect, all possible types? Or from another angle:
> any system that depends on a notion of type that is anything more than
> asking an object what it choses to do at the moment violates
> encapsulation in ways that have serious consequences for what the
> system can and can't do.

Have you considered the Dylan approach to multiple dispatch? As far as I
remember you can implement the usual generic method semantics on top of
an existing purely prototype-based object model as long as one can
distinguish between a message send understood by the object itself and
one understood by one of its prototypes. And you don't have to in case
the object needs to have some special dispatch behaviour.

A future value initiating a wait when a generic method is invoked on it
is doing the Right Thing, isn't it?

Another thing this dispatch model needs is a useful notion of identity
on methods (in the CLOS sense, as in "a particular implementation of a
generic function"), so it may not work out so well for network proxies,
though.

Cheers,
Alex