Re: Generics vs. Message passing: object namespaces

Douglas Philips <[email protected]> Sat, 24 Feb 2007 23:12:19 -0500
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
On 2007 Feb 24, at 11:01 PM, Steve Dekorte wrote:
> On 24 Feb 2007, at 10:04 am, Mike Newhall wrote:
>> At 11:59 AM 2/24/2007 +0000, Tom Locke wrote:
>>> In practice, programmers using object-dispatch languages have no
>>> difficulty understanding where a call is going when the see  
>>> something
>>> like "file.name". Yes the namespace is implicit rather than  
>>> explicit,
>>> but people are good at context! Honestly, this is a BIG reason why
>>> people like object-dispatch. It is. Honestly.
>
> And not knowing the type isn't just an unwanted side-effect, it's  
> actually the goal. Dynamic OO is about escaping from fragile and  
> inflexible type dependencies by using type independent messages  
> instead of type dependent functions.

The Liskov Substitution Principle (1) says that you know the object  
will respond to a particular kind of message. While you don't know,  
and don't want to know, the exact type, you need to know the family  
that the type belongs to, or you the message won't even be coherent.  
In this case what you are "typing" is the message, and that you have  
to know.

			--Doug


(1) http://en.wikipedia.org/wiki/Liskov_substitution_principle