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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6a11907952c890f5,start X-Google-Attributes: gid103376,public From: Mats Weber Subject: Visible or hidden derivation for controlled types ? Date: 1997/03/14 Message-ID: <3329621A.3E9D@elca-matrix.ch>#1/1 X-Deja-AN: 225505741 Organization: ELCA Matrix SA Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1997-03-14T00:00:00+00:00 List-Id: There was a discussion some time ago in comp.lang.ada on whether Adjust, Finalize and Initialize for Controlled types was better done in the visible or private part of the package. In both cases, the type was visibly derived from Ada.Finalization.Controlled. I'd like to know if it is better to make types visibly derived from Ada.Finalization.Controlled, or do that derivation in the private part: Visible: generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean; with function "<" (Left, Right : Element_Type) return Boolean; package Binary_Trees is type Binary_Tree is new Ada.Finalization.Controlled with private; procedure Adjust, ... ... private type Binary_Tree is new Ada.Finalization.Controlled with record ... end record; end; or invisible: generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean; with function "<" (Left, Right : Element_Type) return Boolean; package Binary_Trees is type Binary_Tree is private; ... private type Binary_Tree is new Ada.Finalization.Controlled with record ... end record; procedure Adjust, ... end; Any ideas on which approach is best ?