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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-15 14:21:04 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-kar1.dfn.de!news-han1.dfn.de!news.fh-hannover.de!news.uni-stuttgart.de!news.belwue.de!LF.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: on package naming, should the word Date: Mon, 15 Oct 2001 23:17:17 +0200 Organization: Enyo's not your organization Message-ID: <87u1x0a9ia.fsf@deneb.enyo.de> References: <9q25ec0248o@drn.newsguy.com> <9q421v0bbg@drn.newsguy.com> <9q4d850163k@drn.newsguy.com> <3BC9F6CC.E41BE18A@nbi.dk> <9qd2340djj@drn.newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: archiver1.google.com comp.lang.ada:14600 Date: 2001-10-15T23:17:17+02:00 List-Id: lutz@iks-jena.de (Lutz Donnerhacke) writes: > * Robert*@ wrote: > >In article <3BC9F6CC.E41BE18A@nbi.dk>, Jacob says... >>>The object prefix notation has a very serious limitation, >>>which would actually break quite a few of my programs. Using >>>the object prefix notation, it is not possible to dispatch >>>on the function result type. >> >>A simple example of what you mean? > > type Error is tagged abstract private; > procedure Alarm (e : Error) is abstract; > function Current_Error returns Error'Class; > ... > Alarm (Current_Error); Python translation, in prefix notation: class Error: def Alarm(self): pass def Current_Error(): ... return Current_Error().Alarm() In your example, Current_Error is clearly non-dispatching, so this is not an example for dispatching on the function result type. By the way, C++ does indeed offer static dispatching on the function return type, but the last time I tried it, it involved a considerable syntactic overhead.