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,8c424d8135e68278 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-19 10:20:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: <9v4jsj$bd1$1@infosun2.rus.uni-stuttgart.de> <9v7f26$qn2$1@infosun2.rus.uni-stuttgart.de> <3C1754BA.C4560423@informatik.uni-jena.de> <3c1868b2.1587625@News.CIS.DFN.DE> Subject: Re: Ada2005 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Wed, 19 Dec 2001 18:20:41 GMT NNTP-Posting-Host: 204.127.202.212 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52 1008786041 204.127.202.212 (Wed, 19 Dec 2001 18:20:41 GMT) NNTP-Posting-Date: Wed, 19 Dec 2001 18:20:41 GMT Organization: AT&T Broadband Xref: archiver1.google.com comp.lang.ada:18105 Date: 2001-12-19T18:20:41+00:00 List-Id: "Ray Blaak" wrote in message news:uvgf5rb15.fsf@telus.net... > dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes: > > However, what people criticizing Ada usualy want, is just a syntax > > sugar, which would allow to refer methods using postfix form if there > > is only one dispatching [or class-wide] argument and it is the first > > one. > > Like me. > > > I think in a future revision there could be some variant of rename > > statement which would allow to do this and also the opposite thing > > [for "methods" of protected objects and tasks which are always called > > using the postfix form]. For instance: > > > > type Ellipse is tagged ... > > procedure Draw (Figure : Ellipse, Where : Point); > > entry Ellipse.Draw (Where : Point) renames Draw; > > Why not make it automatic? The extra declaration is tedious and requires extra > maintenance. > > Given: > > e : Ellipse; > > then have > > e.Draw(p) > > be valid iff Draw exists with an Ellipse as its first parameter. > > Then it is truly just an alternate syntax to be used if desired, and not used > if not. > Doesn't it make a mishmash of the name resolution rules? Consider type Note is private; function Pitch (Subject : Note) return Note_Properties.Pitch; function Length (Subject : Note) return Note_Properties.Length; private type Note is record Pitch : Note_Properties.Pitch; Length : Note_Properties.Lenght; end record; In the body of the package, how do you resolve the name "X.Pitch" for an X of type Note?