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.9 required=5.0 tests=BAYES_00 autolearn=ham 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: g2news2.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 Date: Wed, 04 May 2011 10:48:14 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: High-Integrity OO and controlled types References: <679e3217-98dd-43c1-86f6-2038a029c3ea@b19g2000yqg.googlegroups.com> <94f3a272-d071-4a74-bfbd-8f2b4c2347cf@m10g2000yqd.googlegroups.com> <4dbfe6cc$0$7664$9b4e6d93@newsspool1.arcor-online.net> <1in9ypl17vu1t$.1shivr91x8zw6.dlg@40tude.net> <4dc01dca$0$6885$9b4e6d93@newsspool2.arcor-online.net> <1ds39akl3dbii$.mlyj7piip5o3.dlg@40tude.net> In-Reply-To: <1ds39akl3dbii$.mlyj7piip5o3.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4dc112cf$0$6772$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 04 May 2011 10:48:15 CEST NNTP-Posting-Host: 94d8bb70.newsspool3.arcor-online.net X-Trace: DXC=>JQeZc98^jem7>ihJR;B_cMcF=Q^Z^V3h4Fo<]lROoRa8kFejVh1VlLbaOIHdc<]3]bQ3RS6c X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:20122 Date: 2011-05-04T10:48:15+02:00 List-Id: On 5/3/11 6:28 PM, Dmitry A. Kazakov wrote: >>> Actions as amorphous chunks of code tossed here and there depending on >>> scope is a way different ["anisotropic"] approach. In particular it does >>> not fit into safe modular software design, because of this "anisotropy". >> >> What will type-object/module code look like if it is equivalent >> to its nested analog? Better? > > Analogue of what? The point is that "finally" cannot replace initialization > and finalization of objects, specific or class-wide. Could there be a workable design that lifts these two events (entry, exit) to proper, programmable, abstractions and how would they be connected to all of the language, not just the types section? By analog I meant this: The way a nested object goes out of scope may influence objects in some less nested scope. Then, is it (a) possible, (b) feasible, (c) good ROI to design types that are interconnected to reflect all possible effects between types, in the types? Wouldn't this design mix aspects of operation that should be kept in a different, yet connected formalisms that makes explicit use of scopes? As a simple example, I had been considering a relatively global array or set shared between two procedures or tasks; each proc/task would be responsible for part of the elements in the shared data structure. When one fails, the the "exit action" is to "reset" its share of slots/ elements. This sounds like one could design types that do(!) just this as part of their finalization. But it does seem like an awful lot of overhead, and is essentially a type that is-a procedure. My question then is whether or not this overhead is worth it, at least at this fairly low level of small algorithm writing, not system design.