On 1/5/07, Eduardo Cavazos <[EMAIL PROTECTED]> wrote:
> I think methods with the same generic should be able to be defined across
> classes that have nothing to do with each other.

There are really different generics but happen to have the same name.
Much like words can have the same name but be in different
vocabularies, it's the same with generics.

Both generics may have different implementations of the method
specialized on 'object' for example. How would you deal with this?

You'd define the 'foo' generic for apples in its vocab. And the 'foo'
generic for oranges in the oranges vocab. Use USE: to differentiate.

The same issue occurs in Dylan where you play renaming games on module
import sometimes if you want to use the both foo's in a single module.

For the case where you have 'car' and 'aeroplane' and want the 'move'
generic to work across both you probably should create a file
containing the 'protocol' for those objects. This would contain the
generic definitions. This is how some of the Dylan libraries worked
iirc.

Chris.
-- 
http://www.bluishcoder.co.nz

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to