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-21 20:24:55 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pc01.webusenet.com!fe10.atl2.webusenet.com.POSTED!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada References: <254c16a.0305210726.485125de@posting.google.com> <3ECBA778.4070909@crs4.it> Subject: Re: The old "Object.Method" syntax debate MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <_fXya.38075$Di2.11264@fe10.atl2.webusenet.com> X-Complaints-To: abuse@usenetserver.com X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly. NNTP-Posting-Date: Wed, 21 May 2003 23:14:02 EDT Date: Wed, 21 May 2003 22:24:51 -0500 Xref: archiver1.google.com comp.lang.ada:37623 Date: 2003-05-21T22:24:51-05:00 List-Id: "Preben Randhol" wrote in message news:slrnbcnoqe.bde.randhol+abuse@kiuk0152.chembio.ntnu.no... > David C. Hoos wrote: > > > > The parameter is required to identify the "class" of which Prim is an > > operation (method in classical OO-speak). In Ada, you can have > > multiple "classes" (hopefully related) within a single package, and there > > is no class structure to encapsulate both fields and methods of the class. > > > > When the fields and methods are encapsulated in a class structure, then > > you have an implicit controlling parameter (e.g., named "this"). In Ada > > it needs to be explicit. > > > > In this example, X is the object whose state is changed by the operation. > > Yes, but only because it is the first parameter of the procedure, right? No, it's because T is the type of which Prim is a primitive operation. See RM95 N (28) which says: Primitive operations. The primitive operations of a type are the operations (such as subprograms) declared together with the type declaration. They are inherited by other types in the same class of types. For a tagged type, the primitive subprograms are dispatching subprograms, providing run-time polymorphism. A dispatching subprogram may be called with statically tagged operands, in which case the subprogram body invoked is determined at compile time. Alternatively, a dispatching subprogram may be called using a dispatching call, in which case the subprogram body invoked is determined at run time. > > "In Ada you model the problem space, not the solution space." > -- Robert I. Eachus > > Preben > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada > >