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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cfa83146b0781ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-15 08:06:09 PST Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!news.mathworks.com!udel!news.sprintlink.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Overloading for T and T'Class Date: 15 Nov 1994 14:15:27 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3aafpv$qn9@watnews1.watson.ibm.com> References: <3a6goo$j7s@starbase.neosoft.com> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1994-11-15T14:15:27+00:00 List-Id: In article , stt@dsd.camb.inmet.com (Tucker Taft) writes: |> The above is legal, though a call would generally be ambiguous. |> Actually, the class-wide operation can be called, provided the actual |> parameter is of some descendant of T other than T or T'Class itself. |> Furthermore, the primitive operation once inherited by some |> descendant (say T2) would be callable, presuming T2 is declared |> in some other package. Also, if the formal parameters of the two subprograms were given different names, a named parameter association could be used to disambiguate calls with parameters of type T or T'Class. (This is just a language-lawyerly observation, not recommended practice. Kids, don't try this at home.) -- Norman H. Cohen ncohen@watson.ibm.com