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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d9f3074dc2c4699 X-Google-Attributes: gid103376,public From: bbalfour@std.caci.com (Brad Balfour) Subject: Re: How to overload assignment in Ada 95? Date: 1996/12/11 Message-ID: #1/1 X-Deja-AN: 203555675 references: <58aclh$ssd@gaia.cc.gatech.edu> organization: CACI, Inc. newsgroups: comp.lang.ada Date: 1996-12-11T00:00:00+00:00 List-Id: In article , jsa@alexandria (Jon S Anthony) wrote: >In article mheaney@ni.net (Matthew Heaney) writes: > >> Does anyone have a rule of thumb for when a controlled type should publicly >> derive from type Ada.Finalization.Controlled? For example [snip] >> In the former case, clients of the Unbounded_Stack have direct visibility >> to the operations Initialize, Finalize, and Adjust. When is this a good >> thing? A bad thing? > >"Never" (scare quotes just in case there _might_ be some odd case >where it would make sense...) I'd think that a "not so odd" case would be any time that your new abstraction needed to be used anywhere that any descendent of Ada.Finalization.Controlled would be expected (i.e., as Ada.Finalization.Controlled'class). This could be via a generic formal parameter (type foo is new Ada.Finalization.Controlled with private) or via type extension (e.g., a list whose components are of Ada.Finalization.Controlled'class). In order to use these, you must be known to be a (visible) extension of Ada.Finalization.Controlled. A side effect of this is that the three operations are visible to clients. Brad >Jon Anthony >Organon Motives, Inc. >Belmont, MA 02178 >617.484.3383 >jsa@organon.com -- Brad Balfour SIGAda WWW Server CACI, Inc. http://www.acm.org/sigada/ (703) 277-6767 and also try: bbalfour@std.caci.com http://www.adahome.com/ 3930 Pender Drive Fairfax, VA 22030 "...they even have have rules on exceptions" -- Dewar and Schonberg