Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swiss.ans.net!news.dfn.de!gs.dfn.de!fauern!rrze.uni-erlangen.de!faulrs!msn!hugis!shinto!tomi
From: tomi@shinto.nbg.sub.org (Thomas Engel)
Subject: Generic functions...do they have a focus ?
Message-ID: <Cz2poH.qE@shinto.nbg.sub.org>
Sender: tomi@shinto.nbg.sub.org (Thomas Engel)
Organization: STEPeople's home. (A NUGI member)
Date: Thu, 10 Nov 1994 22:41:05 GMT
Lines: 59

Hi all!

Well we have been wondering here whether generic function do have a focus  
(target) or not.

Problem:

generic function do provide some kind of polymorphism and therefore are  
very suitable to build a OO-'like' world. ('like' = depending how close  
you want to stick to a pure OO definition : msg.-passing, encap.  
inheritance)
Well this all has been here before.


What I can't tell and all the CLOS and Dylan docus leave unanswered is  
whether generics have a focus or not.

Imagine a OO system where every object runs in its own thread on its  
private machine and its private environment.
When we are using msg.-passing and 'real' objects it is quite intuitive  
what will happen. The object will receive the msg and when it is able to  
process it, it will do so. This object is clearly specified because it is  
the target of an action.

Now lets have a generic method

	add a b	

where a and b are objects of class number.

What will happen. Can anybody here tell it from the definition ?
What will: add a (add b c) do ?

One could say "Well the first argunemt is the real target"...Nobody did  
state that anywhere. And still, because generics work on datatyps and are  
not real objects they don't have a real 'entry-point' or location.
Datastructures and function execution might reside on different machines  
which is some kind of split object.

And whe by deviding datatypes form their methods it is quite 'normal' to  
have different systems that use the same types but those typs form  
completely different objects/classes. 
Well this typ of inconsistency can be achieved in every language, I know;  
but here I think one might build those beast a little faster.

Can somebody pass me the light ?

Aloha
	Tomi

P.S: Taking a real OO-msg.system (and syntax: target msg. param1 param2..)  
in combination with generic functions would be the way to go IMHO. But  
this might be a more complicated.

-- 
_________________________________________________________
 (tomi@shinto.nbg.sub.org)          Thomas Engel
                                    Neptunstr. 9
     NeXTMail welcome               D - 90522 Oberasbach
