comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Importance of Polymorphism
Date: 1998/02/10
Date: 1998-02-10T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.3.96.980210103620.26246C-100000@shell5.ba.best.com> (raw)
In-Reply-To: 01bd363d$4b0ba040$LocalHost@xhv46.dial.pipex.com


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...).

> 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, 
but I think Smalltalk style OO and Ada style OO (with static typing) won't 
mix well. More likely would be some Java interface type mechanism, and
maybe a limited form of multi-dispatch. We're already seeing a bit of this 
now in GNAT ("downward funargs" via Unrestricted_Access) and the
Intermetrics Java Mapping (pragma Convention( Java_Interface, ... ) ) but 
I doubt we'll see a "doesNotUnderstand" message at runtime soon :-).

-- Brian






  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 [this message]
1998-02-10  0:00   ` Jon S Anthony
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