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!b1g2000hsg.googlegroups.com!not-for-mail From: Eric Hughes Newsgroups: comp.lang.ada Subject: Re: default formal parameters in generic declarations Date: Thu, 6 Mar 2008 10:05:59 -0800 (PST) Organization: http://groups.google.com Message-ID: <8c4ddd97-42ab-454f-9ca4-89bf23e15fa0@b1g2000hsg.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> 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 1204826760 10488 127.0.0.1 (6 Mar 2008 18:06:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 6 Mar 2008 18:06:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b1g2000hsg.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:20200 Date: 2008-03-06T10:05:59-08:00 List-Id: On Mar 6, 2:32 am, Georg Bauhaus wrote: > By way of speculation, can nesting, to the extent it is absent from C++, > lead to at least a partial solution of this problem? [example deleted] The technique you outlined is applicable insofar as name space manipulation goes, yes. I note here that your example uses a formal default subprogram. The problem, really, is that an aspect is larger than a single function. An aspect has state, a state that augments the state of the package for which it is an aspect. State, in Ada, is captured in types. For example, a null aspect has no state, represented by a null record. Ada currently has neither formal defaults for types or packages; I've been focusing on packages. If Ada had a syntax for a formal default type, I might be able to shoehorn everything through that, at the cost of some contortion of syntax, but that's not possible either. > I'm noting all this only because I should think there is some value > in nesting that, just maybe, is easily overlooked. Certainly the point about nesting you make is true. It's one way of addressing the self-reference problem. Yet it doesn't rise to a complete approach. Eric