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,b6e97963d32ee242 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 00:49:48 PST From: "Rodrigo Garcia" Newsgroups: comp.lang.ada References: <254c16a.0305210726.485125de@posting.google.com> <3eccdf77$1@epflnews.epfl.ch> Subject: Re: The old "Object.Method" syntax debate Date: Fri, 23 May 2003 09:49:39 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3ecdd296$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1053676182 128.178.76.8 (23 May 2003 09:49:42 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:37672 Date: 2003-05-23T09:49:39+02:00 List-Id: "David C. Hoos" wrote in message news:vcprq15q8m344e@corp.supernews.com... > I dod not mean to suggest that the availability of "IntelliSense" justified > the > new syntax. The new syntax would eliminate some code redundancy, as > the AI points out. I agree that is the point of the AI. > > I am one of those who suspect that the new syntax would add more confusion > > than advantages to the language. > As I pointed out in an earlier post, this syntax exists in Ada already for > protected types. See, for example line 54 of phil.adb of the dining > philosophers > demonstration program that comes with GNAT: > > Room.Sticks (First_Grab).Pick_Up; > > Room.Sticks (First_Grab) is the object; Pick_Up is the operation. Well, I heard that protected types syntax was also subject of strong discussions and I can understand why. Nevertheless, protected types are declared in a different way than tagged types. They already encapsulate their subprograms and entries in their definition. Their syntax is more similar to that used for declaring classes in mainstream OO languages so I see natural to use the Object.Operation notation with protected types. Even in your example you have the name of the package (Room), so they do not "hide" the use clause. However, primitive operation declarations of tagged types are encapsulated in the package as with any other kind of type and the syntax is inherently different. Why should we be able to use the new syntax only with tagged types? Hmm... Maybe it should be the other way round and keep the tagged type syntax for protected types. I should propose "protected records" whose primitive operations were run in mutual exclusion... what to do with entries then? :^) Rodrigo