[Prev][Next][Index][Thread]
Multimethods 101 (was Re: Multiple dispatch (Re: Q: Python 2.0 preliminary features?))
-
Subject: Multimethods 101 (was Re: Multiple dispatch (Re: Q: Python 2.0 preliminary features?))
-
From: Robin Becker <robin@jessikat.demon.co.uk>
-
Date: Fri, 29 Oct 1999 07:45:02 -0400 (EDT)
-
Organization: Web-Waders Inc
-
References: <381A421D.D8C8E22F@bigfoot.com>
-
Xref: grapevine.lcs.mit.edu comp.lang.python:65663 comp.lang.dylan:11007
In article <381A421D.D8C8E22F@bigfoot.com>, Louis Madon
<madonl@bigfoot.com> writes
>
...
I'm a bit confused here after seeing the argument presented as a
function of only two types. Say I implement + for floats and then Tim
does it for rationals then in terms of functional mappings + has 2
inputs and one output ie 3 possible types are involved.
Thus my take is that we have
f f and r r
f + r +
after the combination we have
f f r and r f r
f+ . f. .
r. . r. +
so to my way of thinking to fill in we seem to have to modify the
existing operators or provide the mapping f-->r or r-->f
--
Robin Becker
Follow-Ups:
References: