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,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 10:12:31 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!nntp4.savvis.net!uunet!dfw.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: on package naming, should the word X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3BCC670D.B6B7F5FF@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <9q25ec0248o@drn.newsguy.com> <9q421v0bbg@drn.newsguy.com> <9q4a37$npd$1@nh.pace.co.uk> <9q4e59018lm@drn.newsguy.com> <9q4lje$8201@news.cis.okstate.edu> <3bc6a8ad.1988649@news.demon.co.uk> <3BC721DA.BCBC4818@boeing.com> <3bca98d8.736428@news.demon.co.uk> <%DHy7.30147$ev2.37198@www.newsranger.com> <3bcc2b7f.4569851@news.demon.co.uk> Mime-Version: 1.0 Date: Tue, 16 Oct 2001 16:57:49 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:14712 Date: 2001-10-16T16:57:49+00:00 List-Id: John McCabe wrote: > > On Mon, 15 Oct 2001 20:26:35 GMT, Ted Dennison > wrote: > > >The way I was taught it, an "object" consists of a data type, together with the > >operations on that type. Since a package is one means of encapsulating both > >those things into one concept, it can indeed be considered an "object". > > For a generic package, sure, but not a non-generic package. An object > is a specific instance of a more generalised entity. The more > generalised entity may be a user-defined or language-defined type, a > Class (e.g in C++ and Java) etc. > > A (non-generic) package is simply a means of encapsulating something > that can be instantiated as an object - e.g. a tagged type. Bollards! A non-generic package may be the only instance of a design concept: package Stupid_Queue is procedure Put (Item : in Integer); function Get return Integer; end Stupid_Queue; [Properly documenting this specification and implementing the body are left as exercises for the reader.] This is an instance of the more general concept of a queue of integers. This is a contrived example that should never be found in practice, but application-specific cases in which neither extensibility nor multiple instances are required are certainly not impossible to conceive. -- Jeffrey Carter