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: fac41,953e1a6689d791f6 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public From: Robb Nebbe Subject: Re: Eiffel and Java + Ada dispatching Date: 1996/11/07 Message-ID: <3281B0CB.A6@iam.unibe.ch>#1/1 X-Deja-AN: 195050743 references: content-type: text/plain; charset=us-ascii organization: Dept. of CS, University of Berne, Switzerland mime-version: 1.0 newsgroups: comp.lang.eiffel,comp.lang.ada x-mailer: Mozilla 2.02 (X11; I; SunOS 5.4 sun4m) Date: 1996-11-07T00:00:00+00:00 List-Id: Joachim Durchholz wrote: > However, the central difference is that dynamic binding is always there in > Eiffel. You don't have to rewrite Eiffel code to make overloading work, > you just don't use polymorphism. You'd have to rewrite Ada code to go from > overloading to dynamic binding. If you need dynamic binding then it certainly isn't overloading that you would use to replace it. Overloading and dispatching are certainly related language mechanisms but not in this way. Ada has both dispatching and overlaoding. Eiffel has just dispatching. However, some of what Eiffel does with dispatching Ada does with overloading. This is because it is much easier to reason about polymorphism locally in Ada than it is in Eiffel. When there is no dispatching Ada uses overloading to resolve which operation is invoked. In contrast Eiffel always uses the dispatching rules but the dispatch might be optimized away. So if someone says overloading in Ada is bad do they mean the part that overlaps with dispatching in Eiffel or the part that goes beyond what you can do in Eiffel? If you adopt an Eiffel point of view and ask yourself what would overloading give me that Eiffel doesn't already provide then you come to the conclusion that there really isn't any major reason to add overloading to Eiffel. However, you can not conclude that you can just rip overloading out of any language because it might play a more important role in some other language, such as Ada. Generalizing knowledge about one language to another language is very difficult without an intimate understanding of the other language. The real kicker is it is also very difficult to know when you have achieved this level of undertanding :-) Robb Nebbe