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: jsa@alexandria (Jon S Anthony) Subject: Re: How to overload assignment in Ada 95? Date: 1996/12/10 Message-ID: #1/1 X-Deja-AN: 203384403 sender: news@organon.com (news) references: <58aclh$ssd@gaia.cc.gatech.edu> organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-12-10T00:00:00+00:00 List-Id: 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 > > with Ada.Finalization; > ... > package Unbounded_Stacks is > > type Unbounded_Stack is new Ada.Finalization.Controlled with private; > ... > > versus > > with Ada.Finalization; > ... > package Unbounded_Stacks is > > type Unbounded_Stack is private; > ... > private > > type Unbounded_Stack is new Ada.Finalization.Controlled with > record ... end record; > ... > > 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...) /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com