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 07:43:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: <254c16a.0305210726.485125de@posting.google.com> Subject: Re: The old "Object.Method" syntax debate X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1053701029 12.211.13.75 (Fri, 23 May 2003 14:43:49 GMT) NNTP-Posting-Date: Fri, 23 May 2003 14:43:49 GMT Organization: AT&T Broadband Date: Fri, 23 May 2003 14:43:49 GMT Xref: archiver1.google.com comp.lang.ada:37694 Date: 2003-05-23T14:43:49+00:00 List-Id: "David C. Hoos" wrote in message news:vcn7svfjbannd6@corp.supernews.com... > This was brought up in a forum regarding enhancements for Ada0X, > at the SIG-Ada meeting last December, and the consensus was it > should be done, so it probably will. > If only we could add an alternate syntax for defining the methods (functions and procedures) associated with an object, such as: type obj is tagged record field : Integer; function Fun1( in; value : in integer ) return Integer; procedure Proc1( in out; value : in out integer ); end record; Yeah, I've mentioned this before, and nobody seems to agree with me, but I still hate dealing with "freezing rules" to figure out where dispatching operations end. Pascal and C/C++ have two forms of "if" statements, one where the "if" is followed by a single line, the other where the "if" is followed by a block. Ada has only one form, which always uses an "end if". I like the form in Ada a LOT better since it always explicitly gives the bounds of the if statement. IMO tagged types (in their current form) do exactly the opposite, they leave you hanging. This is one of the very few places I like C++ and Java syntax better than Ada. Steve (The Duck) > In defense of the charge that the objection is "vacuous," I would point > out that that notation prevents the need to fully qualify the subprogram > name (in the absence of use clauses) when invoking the subprogram > for an object which is in scope. > > Having worked in the .NET environment for quite a while, it's really > nice to be able to type an object name, then the dot, and immediately > see a little pop-up-window showing all of the available operations, > and being able to select from the list instead of typing the full > subprogram name. >