[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the forward method [dynamic vs. static typing]



On Dec 10, 2003, at 09:58, Ken Shan wrote:

> On 2003-12-09T20:21:41-0800, Chris Page wrote:
>> 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).
>
> That's not dispatching on the return type of a function; that's 
> dispatching on the type of a value returned by a function.  
> Dispatching on the return type of a function does not involve calling 
> the function.

Which is why I specifically included Dylan and C++ in that list, both 
of which can use the (statically-known) return type of function A to 
dispatch the call to B at compile time. Also, I'm not certain Lisp or 
Smalltalk should necessarily be excluded here. (Common) Lisp allows 
type declarations and I've heard there are flavors of Smalltalk that 
have them, as well.

But that paragraph of mine was meant to contrast with the topic at hand 
to help clarify, not to argue that those languages do the kind of 
dispatching being discussed.

-- 
Chris Page - Software Wrangler - palmOne, Inc.

   Dylan + You = Code
   <http://www.gwydiondylan.org/>
   <http://www.cafepress.com/chrispage>