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

Re: dynamic vs. static typing




On Nov 18, 2003, at 2:25 PM, Ken Shan wrote:
> Funny how existential types keep coming up. (:
>
>     Konstantin Läufer. 1996.  Type classes with existential types.
>     Journal of Functional Programming 6(3): 485-517.
>     http://www.math.luc.edu/~laufer/papers/jfp96.pdf
>     http://www.math.luc.edu/~laufer/papers/Haskell/
>     http://www.math.luc.edu/~laufer/research/publications.html

Please summarize.

> (By the way, if all you know about the List is that it contains a bunch
> of objects, and if there is nothing that you can do with every object 
> --
> that is, if there is no message that every object responds to -- then
> it is a pretty useless List, which you might as well replace with a
> nonnegative integer.)

What if I want to send a message to all the objects in the list that 
respond to a method, but not to those that don't? For example, let's 
say I have a list of things in my house and I want to send a turnOff 
message to everything that can be turned off.

- Steve