Re: Overloading function calls

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Wed, 1 Jun 1994 11:06:21 -0400

On Jun 1, 12:28, Marc Wachowitz wrote:
>
> Tim Peters (tim@ksr.com) wrote:
> [...]
> > So I haven't yet thought of something reasonable enough to suggest
> > (despite that I thought I did last time I wrote <wink/sigh>).
>
> I guess it wouldn't be reasonable to suggest something like dispatching
> on both argument types of operators? Maybe we could even invent it; the
> treatment of syntactic operators is already a special case, anyway ;-)
>

Your right. ( It wouldn't ! :-)

Since Python doesn't have multi-methods, I don't thing they make sense
as the solution for operator typing and coercion. Operators aren't
*THAT* special case - that's why overloading works. So if you are
going to provide multi-methods, you should provide them generally,
which would be a major shift for Python.

But this thread demonstrates why multi-methods are a good idea in
THEORY, so if you want to submit an experimental implementation, I'll
be happy to play around with it! ( But I suspect that actually using
it would be very awkward in a language that was not _built_ around the
idea or had some support for signature analysis, etc. )

- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics