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,e859f774bbb3dfb3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer01.iad!news.highwinds-media.com!cycny01.gnilink.net!cyclone1.gnilink.net!gnilink.net!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 25 Jun 2008 01:35:17 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: another way to shoot yourself in the foot? References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> <483ugmvkl2ea.1hrqsq7ru4t1x$.dlg@40tude.net> <12dhu8e1w5ac9.1s9hzkf9d2rsy$.dlg@40tude.net> <3bc1018b-b275-4a59-8302-6a3262766f63@z24g2000prf.googlegroups.com> <6ug5vhz5j1e4$.1lqpd52jz6qry.dlg@40tude.net> <1s88o46xl9o9b$.1e88zxl9es93z$.dlg@40tude.net> In-Reply-To: <1s88o46xl9o9b$.1e88zxl9es93z$.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <486184b7$0$6615$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Jun 2008 01:35:19 CEST NNTP-Posting-Host: b173213c.newsspool2.arcor-online.net X-Trace: DXC=Yn4ccl<]M[kUoRk[hk2WalA9EHlD;3Ycb4Fo<]lROoRa8kFejVho7 Dmitry A. Kazakov wrote: > The enclosing object does not expect > its components to prematurely finalize themselves. It is just a bad design > turned upside down: It seems like everyone wishes to force dynamic context information to be expressible as static type features, together with implicit callback operations from Controlled'Class. Why not use plain old scopes when establishing context for objects? Or generic elaboration. Is anything wrong with having all of lifetime, startup and cleanup of objects controlled by a combination of: nesting, making calls, handling exceptions, and scoping? Would Finalize be superior when calls from within it will have to refer to all kinds of other data anyway, even indirectly? The Controlled subprograms are linked to a single type. >From what I know about Aspect Oriented Programming, it shows that building modules around a single type does not always yield the right abstraction: When the thing is seen from a different angle, the type should have a different interface. >From yet another viewpoint, the type's operations should cooperate differently. In still another perspective some abstraction is not represented by this type alone. Instead, it would be represented by some combination of this type and another type. And now automatic operations like Initialize and Finalize, hooked on a single type (and possibly discriminants---does GNAT like at last :-) are supposed to be the solution of all data management?