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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4e5770c49b971630 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: High-Integrity OO and controlled types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Mon, 2 May 2011 09:59:33 +0200 Message-ID: NNTP-Posting-Date: 02 May 2011 09:59:33 CEST NNTP-Posting-Host: 716eb11c.newsspool3.arcor-online.net X-Trace: DXC=Cko1VL9kCTAk:C4l9A;OcOMcF=Q^Z^V3H4Fo<]lROoRA8kF On Sun, 01 May 2011 17:29:10 -0400, Robert A Duff wrote: > Maciej Sobczak writes: > >> "Controlled types are not supported since they require extensive run- >> time support." A prejudice >> This is surprising to me. I don't see anything in controlled types >> that would require "extensive run-time support". > > Most of the "extensive run-time support" comes from heap-allocated > objects containing controlled parts. > > If you say (for example, perhaps in a nested scope): > > type A is access T'Class; > type T2 is new T with ...; > X : A := new T2'(...); [...] > Finalization also needs to deal with partially-initialized objects, > and finalize exactly those subcomponents that were successfully > initialized. > > That's all "extensive run-time support". No, that is an extensive run-time support of dynamically allocated controlled objects. Any dynamically allocated object requires run-time support (e.g. heap), which can be considered extensive. Regarding Finalization, that is not "support", it is a part of the type's semantics. In this sense the ADD instruction is a run-time support of Integer type, and thus the whole program's code is "support" of itself. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de