[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the forward method [dynamic vs. static typing]
On Dec 9, 2003, at 19:20, Ken Shan wrote:
> On 2003-12-09T18:16:51-0800, Chris Page wrote:
>> I don't see what this has to do with static or dynamic typing. It has
>> more to do with whether or not your language allows for some type of
>> polymorphism so you can use the same function/message name, which is
>> an orthogonal concern. Dylan, Lisp, Smalltalk and C++ all allow for
>> this.
>
> I don't know of any language said to be dynamically typed that allows
> for dispatch based on return type; do you?
Dylan, Lisp, Smalltalk and C++. In the sense that a compiler can look
at the return type of a function A and use that to dispatch a
subsequent call to function B (when you pass the result of A to B).
However, I suppose what you mean is that you want to dispatch a call to
A based upon the types of the arguments given to it, and the argument
type(s) of function B? Interesting, but is it useful? Can you provide
an example?
--
Chris Page - Software Wrangler - palmOne, Inc.
Dylan + You = Code
<http://www.gwydiondylan.org/>
<http://www.cafepress.com/chrispage>