From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: OO in Ada
Date: Tue, 8 Oct 2002 13:48:35 -0400
Date: 2002-10-08T13:48:35-04:00 [thread overview]
Message-ID: <uq66jkl7g2hsd1@corp.supernews.com> (raw)
In-Reply-To: anv27t$jrs$1@a1-hrz.uni-duisburg.de
"Georg Bauhaus" <sb463ba@l1-hrz.uni-duisburg.de> wrote in message
news:anv27t$jrs$1@a1-hrz.uni-duisburg.de...
> Matthew Heaney <mheaney@on2.com> 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.
next prev parent reply other threads:[~2002-10-08 17:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-04 2:14 OO in Ada Rick Duley
2002-10-04 2:55 ` Jim Rogers
2002-10-04 17:35 ` Hyman Rosen
2002-10-05 0:20 ` Jim Rogers
2002-10-05 23:38 ` Dmitry A.Kazakov
2002-10-05 15:25 ` Jim Rogers
2002-10-06 21:37 ` Dmitry A.Kazakov
2002-10-06 2:18 ` Hyman Rosen
2002-10-06 3:00 ` Jim Rogers
2002-10-08 21:08 ` Gisle Sælensminde
2002-10-04 3:37 ` Chad R. Meiners
2002-10-04 5:32 ` Simon Wright
2002-10-04 6:01 ` tmoran
2002-10-04 15:05 ` Matthew Heaney
2002-10-05 2:14 ` SteveD
2002-10-05 8:54 ` Preben Randhol
2002-10-07 14:10 ` Matthew Heaney
2002-10-07 19:52 ` Jeffrey Carter
2002-10-08 21:18 ` Dmitry A.Kazakov
2002-10-08 9:53 ` John McCabe
2002-10-08 15:37 ` Matthew Heaney
2002-10-08 16:47 ` Georg Bauhaus
2002-10-08 17:48 ` Matthew Heaney [this message]
2002-10-08 17:16 ` Warren W. Gay VE3WWG
2002-10-08 17:58 ` Matthew Heaney
2002-10-09 16:59 ` Warren W. Gay VE3WWG
2002-10-08 10:21 ` Preben Randhol
-- strict thread matches above, loose matches on Subject: below --
1998-05-15 0:00 Gisle S{lensminde
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox