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:25:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed.bc.tac.net!news.bc.tac.net!not-for-mail Sender: blaak@TORUS Newsgroups: comp.lang.ada Subject: Re: Ada2005 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> <3c1f292d.11941015@News.CIS.DFN.DE> <3c204d01.387078@News.CIS.DFN.DE> From: Ray Blaak Message-ID: Organization: The Transcend X-Newsreader: Gnus v5.7/Emacs 20.7 Date: 19 Dec 2001 10:23:51 -0800 NNTP-Posting-Host: 208.181.209.61 X-Complaints-To: news@bctel.net X-Trace: news.bc.tac.net 1008786341 208.181.209.61 (Wed, 19 Dec 2001 10:25:41 PST) NNTP-Posting-Date: Wed, 19 Dec 2001 10:25:41 PST Xref: archiver1.google.com comp.lang.ada:18108 Date: 2001-12-19T10:23:51-08:00 List-Id: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes: > On 18 Dec 2001 11:51:09 -0800, Ray Blaak wrote: > >dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes: > >> Also you should support fully qualified forms like: > >> > >> e.Geometry.Flat.Figures.Conic.Float_Figures.Ellipse.Draw (p); > > > >Why? It is misleading, since object.something usually means something in the > >context of object. > > Because, actually "context of object" is rather an imaginary thing. > Consider overriding. What if the parent's Draw should be called? Then > if sometimes MI will be supported, what about name clashes induced by > multiple inheritance? "context of object" = "scope where object's type is defined" If this syntactical transformation is only supported for primitive operations, then the full information should be available in the context where the object's type is defined, including inherited routines. So, these: e.Draw(p); The_Canvas.First_Shape.Draw(p); would be known to be possible method calls, since "Draw" would not be record fields or protected object entries. Assuming that e's type is in the package E_Shape and The_Canvas.First_Shape's type in in the package Shape, the compiler then tries: E_Shape.Draw(e, p); Shape.Draw(The_Canvas.First_Shape, p); And then regular Ada rules for routine matching kick in, including possible future MI and multiple dispatch enhancements. If the object's type is directly visible, the transformation could be just: Draw(e, p); and again, regular Ada rules could apply. > >I also have no problem with e."abs", or e."+", given that one can already do > >the strange "+"(1, 2) directly anyway. > > There still could be hidden pitfalls with an automatic inference of > postfix <-> functional forms. Let more knowledgeable people say. I would be happy to learn about them. Since I am only discussing syntactical transformations that can be mapped to existing Ada semantics, I expect, perhaps incorrectly, that any pitfalls can be readily dealt with. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, blaak@telus.net The Rhythm has my soul.