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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,43f6bd9b498b66d0 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o77g2000hsf.googlegroups.com!not-for-mail From: Eric Hughes Newsgroups: comp.lang.ada Subject: Re: default formal parameters in generic declarations Date: Fri, 7 Mar 2008 12:09:48 -0800 (PST) Organization: http://groups.google.com Message-ID: <5a3818e9-2f04-4c28-9011-834571b58b21@o77g2000hsf.googlegroups.com> References: <9b3bac4d-5ae1-4a1b-a81e-9aa9ae1843e0@e31g2000hse.googlegroups.com> <0078161e-64c7-4fa8-9794-b840d855a88b@q78g2000hsh.googlegroups.com> <47cfba2a$0$14412$9b4e6d93@newsspool3.arcor-online.net> <8c4ddd97-42ab-454f-9ca4-89bf23e15fa0@b1g2000hsg.googlegroups.com> <87lk4vv5kg.fsf@ludovic-brenta.org> <47d11e46$0$25511$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 166.70.57.218 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1204920589 14570 127.0.0.1 (7 Mar 2008 20:09:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 7 Mar 2008 20:09:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o77g2000hsf.googlegroups.com; posting-host=166.70.57.218; posting-account=5RIiTwoAAACt_Eu87gmPAJMoMTeMz-rn User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20225 Date: 2008-03-07T12:09:48-08:00 List-Id: On Mar 7, 3:51 am, Georg Bauhaus wrote: [another example elided] > This object > can be overridden, passed downwards to other instantiations, > "intercepted" by different Functionality_Interface'Class objects... > But, as Eric has explained, going along this path does not > yet lead to complete solution. I would like to expand upon this. The essential deficit is that subprogram instantiation only addresses the middle of the life cycle of an object, but neither it's beginning nor end. During the middle of the life cycle, there must be a way of hooking into the operation of an object. In AOP parlance, these are called cut points and their manifestation is a subprogram (either by call or in-line). Yet this does not address memory allocation of the state of an aspect, which must, in general, be allocated one-to-one (aspect-to-object). The easiest pattern for this simply inserts the aspect state into the object; this is efficient and avoids explicit deallocation. There are other ways one might conceive of doing this, and all of them require action at the beginning and end of the life cycle. You could accomplish this, say, with a controlled base type and an associative array for arbitrary dereference. Without type or package formal parameters, however, it's impossible to get the aspect state simply inserted. Eric