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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: donh@syd.csa.com.au (Don Harrison) Subject: Re: To overload or not to overload (was Eiffel and Java + Ada dispatching) Date: 1996/11/07 Message-ID: #1/1 X-Deja-AN: 195038181 sender: news@syd.csa.com.au x-nntp-posting-host: dev11 references: <32805D4D.77B6@iam.unibe.ch> organization: CSC Australia, Sydney reply-to: donh@syd.csa.com.au newsgroups: comp.lang.eiffel,comp.lang.ada Date: 1996-11-07T00:00:00+00:00 List-Id: Robb Nebbe writes: :To overload or not to overload is not the question IMO. :Overloading is a language mechanism that Ada has and Eiffel :doesn't; this is an apples and oranges problem. The real question :is how do languages figure out which method should be invoked. Yes, a nice non-contentious topic of discussion is just that. Personally, I'm more interested in what is the simplest binding mechanism a language can provide which does everything you need and no more than you need. :Ignoring scoping rules we see that: : :C uses just the name. : :Eiffel uses the name and the type of one of the parameters. : :Ada uses the name and the type of all the parameters. Nice summary. :C is broken. When you program in C you have to come up with naming :schemes to avoid identifier clashes. We can always agree by throwing rocks at C. :) :Eiffel and Ada work just :fine. If Eiffel truly used just the name and nothing more then not :only would every routine of every class have to have a different :name but polymorphism would be impossible. Yes. :Languages are essentially sets of mechanisms. You seem to be :claiming that Ada has one mechanism and Eiffel doesn't when in :fact even though Eiffel doesn't have the same mechanism it does :have one that overlaps. I think we're saying pretty much the same thing - that individual binding mechanisms should not be considered in isolation but in relation to each other. However, in relation to Eiffel, I'm saying that it has no *need* of an overloading mechanism because it is redundant due to the availability of covariance. An operation which you might choose to implement in Ada by overloading an inherited one (because they do the same job), you would implement in Eiffel as an overriding operation because it belongs in the same inheritance hierarchy (according to Eiffel's scheme of things). [Before half the world disputes the latter part of this sentence, kindly note the qualifier in parentheses]. So, for Eiffel, rather than dynamic binding overlapping with overloading, it obviates the need for it. Don. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Don Harrison donh@syd.csa.com.au