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,9bf8bfc34e223b4d X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: GNAT controlled types Date: 1998/01/28 Message-ID: #1/1 X-Deja-AN: 319868183 Sender: news@inmet.camb.inmet.com (USENET news) References: <01bd2b67$04bf1760$79f482c1@xhv46.dial.pipex.com> X-Nntp-Posting-Host: houdini.camb.inmet.com Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-01-28T00:00:00+00:00 List-Id: Nick Roberts (Nick.Roberts@dial.pipex.com) wrote: : Many thanks for the comprehensive reply. I had forgotten that the rule : applies wholesale to tagged types (as it sensibly must). : I have to say, with the benefit of hindsight, it might have been a better : decision to implement controlled types in a different way. I feel sure : that -- by means of inlining -- undue performance penalties could be : avoided. It is surely inconvenient, at times, not to be able to control : non-tagged types. This ability may have been considered 'dangerous' or : unnecessary by the committee, but wrongly IMHO! Any kind of record or array may have controlled components. I highly recommend that you make individual components "clean up" after themselves rather than relying on the root type being controlled. By the way, Ada 95 was not designed by a committee. It was designed by a design team, and reviewed by Ada experts throughout the international Ada community. The decision to base controlled types on type extension was an attempt to ensure a relatively straightforward implementation, where the root controlled type would contain links for inserting the controlled object on a linked list. Ultimately, other considerations (such as "mutable" discriminated types) pushed us to abandon the links-through-the-object implementation model in our Ada 95 front end, but I believe other compilers have taken advantage of the type extension approach. : Nick Roberts : Croydon, UK : Proprietor, ThoughtWing Software; Independent Software Development : Consultant : * Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 * -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA