comp.lang.ada
 help / color / mirror / Atom feed
From: Jon S Anthony <jsa@synquiry.com>
Subject: Re: Importance of Polymorphism
Date: 1998/02/10
Date: 1998-02-10T00:00:00+00:00	[thread overview]
Message-ID: <ufk9b30wsl.fsf@synquiry.com> (raw)
In-Reply-To: Pine.BSF.3.96.980210103620.26246C-100000@shell5.ba.best.com


Brian Rogoff <bpr@shell5.ba.best.com> writes:

> 
> On 10 Feb 1998, Nick Roberts wrote:
> > It's the world's most contended subject, I get the impression, but my own
> > take on it is: I believe it is dynamic polymorphism which really defines
> > the _key_ advantage of object oriented programming.  It's perhaps not so
> > obvious in a compiled language such as Ada, especially where there is not
> > (yet) a culture of using dynamic polymorphism very heavily.
> 
> Also a key disadvantage. No, I'm not saying that dynamic dispatch is bad
> or evil, just that there are costs (which function am I really calling?, 
> why do I have to have this tag on everything? etc...).

Yes, exactly.  However, inheritance per se' is probably the root of
all the "disadvantage" here, not so much simply dynamic dispatch.
Another way of saying this is that (class) inheritance based dd is
where such problems arise (with the attendant benefits of that
abstraction as well).

> > In the future, it may well be that Ada gets rather like SmallTalk --
> 
> I hope we get block closures, or at least some limited closure facility, 

Right.

> maybe a limited form of multi-dispatch. We're already seeing a bit of this 

Now this I would really like to see.  Well, to be fair, it would
really depend on what it ended up looking like.  If you could define
such operations outside the scope of their attendant type definitions,
that would really be handy (IMO) - but I really doubt that would happen.


/Jon

-- 
Jon Anthony
Synquiry Technologies, Ltd., Belmont, MA 02178, 617.484.3383
"Nightmares - Ha!  The way my life's been going lately,
 Who'd notice?"  -- Londo Mollari




  reply	other threads:[~1998-02-10  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-10  0:00 Importance of Polymorphism Nick Roberts
1998-02-10  0:00 ` Brian Rogoff
1998-02-10  0:00   ` Jon S Anthony [this message]
1998-02-10  0:00     ` Brian Rogoff
1998-02-12  0:00       ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox