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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!igor!yoda!jls From: jls@yoda.Rational.COM (Jim Showalter) Newsgroups: comp.lang.ada Subject: Re: layered packages Keywords: layering reuse factoring Message-ID: Date: 18 Feb 91 00:16:13 GMT References: <44213@ut-emx.uucp> Sender: news@Rational.COM List-Id: I submitted an Ada 9x on this, since I believe that at the point of derivation you should now get matrix's fetch and store for FREE (this is how it works in an inheritance language like C++) unless you want to specifically override the inherited defaults. Until such time as this is changed, what you do now is write stupid little "skins" that basically just coerce the types from derived to base and/or from base to derived, and call the base type's operations. For example, here is matrix.fetch: function fetch (from_adt : in adt; at_row, at_col : in index) return scalar is begin return low_level.fetch (from_adt => low_level.adt (from_adt), ....); end fetch; Barring this little annoyance, I think a derived type is better than a subtype in this example. -- ***** DISCLAIMER: The opinions expressed herein are my own. Duh. Like you'd ever be able to find a company (or, for that matter, very many people) with opinions like mine. -- "When I want your opinion, I'll beat it out of you."