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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,381db495fa3adf75,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!d19g2000yqb.googlegroups.com!not-for-mail From: Jarno Neniu Newsgroups: comp.lang.ada Subject: Package hierarchy. Extensibility. Date: Wed, 11 Mar 2009 17:02:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: <91c9292b-d661-4744-bed2-b9c8a6305196@d19g2000yqb.googlegroups.com> NNTP-Posting-Host: 85.175.87.112 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236816137 31779 127.0.0.1 (12 Mar 2009 00:02:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 12 Mar 2009 00:02:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d19g2000yqb.googlegroups.com; posting-host=85.175.87.112; posting-account=zcHzhQoAAAC_EJAfJWHypS9JnqebSAaY User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.25 (Windows NT 6.0; U; en),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5022 Date: 2009-03-11T17:02:17-07:00 List-Id: Hello. I'm not able to decide about which design is the best (extensibility, maintainability and recompilation friendliness are important), so I'm demanding for any humble and not so humble opinions. As an example of hierarchy consider representation of geometrical points. One of representations is preferable and considered to be the main representation (Cartesian 2D and 3D points), but there is unspecified amount of other representations, which could be added to the system later (points in polar, spherical, cylindrical coordinate systems). Conversion between representations should be somehow available and it is desirable for representations to be generic. Which is the best way to design the hierarchy? Should it be something like this: package Points is -- Preferable representation. Cartesian point. type Point is ... end Points; package Points.Spherical is type Spherical_Point is ... end Points.Spherical; package Points.Cylindrical is type Cylindrical_Point is ... end Points.Cylindrical; Or should it be dummy package =ABPoints=BB to which other representations are connected: package Points is end Points; package Points.Cartesian is type Cartesian_Point is ... end Points.Cartesian; package Points.Spherical is type Spherical_Point is ... end Points.Spherical; Something else?