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,a270a1fc28d4f812 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-25 21:57:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3D1949A3.1050401@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: OOD in Ada? References: <3d135676$0$8511$cc9e4d1f@news.dial.pipex.com> <3d1870b0$0$8507$cc9e4d1f@news.dial.pipex.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 26 Jun 2002 04:57:17 GMT NNTP-Posting-Host: 12.86.34.66 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1025067437 12.86.34.66 (Wed, 26 Jun 2002 04:57:17 GMT) NNTP-Posting-Date: Wed, 26 Jun 2002 04:57:17 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:26707 Date: 2002-06-26T04:57:17+00:00 List-Id: Hyman Rosen wrote: > David Crocker wrote: > >> There is no way I want to put all the expression and statement classes in >> one package! The natural way to construct the project is to put each >> class >> in its own file (and hence package, if I am using Ada). > > > Keeping in mind that I don't know Ada, isn't this what child packages > are for? > Declare the base expression and statement classes in a package, and put > each > descendant in its own child package. > That is one of the things hierarchical packages are for. Note that use of hierarchical packages exposes public and private package members differently than developing type hierarchies in unrelated separate packages. Also remember that the Ada package provides an equivalent to the C++ namespace. It is certainly NOT reasonable to restrict a namespace to contain only one class in C++. In the same way, it is often beneficial to combine several type definitions in a single Ada package. Jim Rogers