OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

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

Re: Picking the Tools -- Marrying processing models to data models

On Wed, 23 May 2001, Uche Ogbuji wrote:

> > No! Polymorphism! The existing code relies on an object implementing a
> > given interface, and you can write other classes to implement that
> > interface and swap them in, you don't have to subclass the existing
> > "Customer" class.
> No.  Inheritance.  This is part of my core point: OO has a very limited
> concept of polymorphism, which is really just late binding.  OO restricts
> late binding to sub-type constraints and thence sub-class function
> dispatch.

Depends what OO system you chose :-)

Sub-type can be boiled down to "provides interface X" if you use proper
interfaces / abstract classes. Providing the same interface is a pretty
minimal requirement for "interchaneability". You don't have to inherit
your proxy Customer from the original Customer object, you just have to
provide the same interface.

> My point is that you can get all the benefits of swapping in the Customer
> code without late binding tied exclusively to inheritance.  IOW,
> polymorphism is much bigger than OO.

Gimmee an example, I don't totally follow you...


                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software