From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,37ce17cd381efa19 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Importance of Polymorphism Date: 1998/02/10 Message-ID: #1/1 X-Deja-AN: 323819582 References: <01bd363d$4b0ba040$LocalHost@xhv46.dial.pipex.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 887136583 5375 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-02-10T00:00:00+00:00 List-Id: 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