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

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

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?  (Perl's wantarray only goes
so far; specifically, it does not look beyond a function's immediate
caller and so cannot deal with higher-order function combinators, such
as the "." for function composition that I used in my code example, or
recursion.  I suppose you can always implement a type inference engine
in Smalltalk...)

(In a similar vein, I also don't know how to dispatch based on different
function types, e.g., treat functions that return integers differently
from functions that return file handles without calling them.)

On 2003-12-09T18:23:44-0800, Mike Austin wrote:
> Some of us are not familliar with this syntax, what is going on here?  Does
> read know how to read because of its next operation?

I think you have the right intuitive idea.

Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
International Human Rights Day * 2003-12-10 * http://www.un.org/rights/

What if All Chemists Went on Strike? (science fiction)

Attachment: signature.asc
Description: Digital signature