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,c9a5d6b3975624e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-08 10:50:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news-x2.support.nl!skynet.be!skynet.be!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: OO in Ada Date: Tue, 8 Oct 2002 13:48:35 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3da2aafd.7023559@news.demon.co.uk> 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 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:29597 Date: 2002-10-08T13:48:35-04:00 List-Id: "Georg Bauhaus" wrote in message news:anv27t$jrs$1@a1-hrz.uni-duisburg.de... > Matthew Heaney wrote: > : Push_Back (List, Item); > : > : then is there any question that I'm appending a new element, with the value > : Item, to the back of object List? > > From a different perspective, isn't "pushing back" different > from "appending" in standard English? (I'm asking this because > I don't known English well, so I might miss something.) They are the same thing. The example comes from Charles, which is a library modeled in the C++ STL. I actually considered using the name Append instead of Push_Back (this would be more consistent with names used in Ada.Strings.*), but I went ahead and used Push_Back, to be consistent with Pop_Back. http://home.earthlink.net/~matthewjheaney/charles/index.html > So, will I have to know the meaning "append" of "push_back" (as > opposed to "push_front" for "prepend"), and infer the meaning > from the context (List, Item)? Or from Stepanov's (and Musser's?) > popular (and standardized, so there...) wording? The name is identical to the STL, so if you understand what list.push_back(item); means, then it should be obvious what Push_Back (List, Item) means, too. > That is to say, shouldn't there be an "onto" part or similar > in the Push_Back? There is a tradition in Ada that the first parameter of a primitive operation of a user-defined type be the "target" of the operation, that's why the Push_Back operation has the parameter order it does. For example, if I see this: Write (File, Item); then it seems obvious (to me) that the operation is writing Item to the file object File.