From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: default formal parameters in generic declarations
Date: Thu, 06 Mar 2008 23:41:19 +0100
Date: 2008-03-06T23:41:19+01:00 [thread overview]
Message-ID: <87lk4vv5kg.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 8c4ddd97-42ab-454f-9ca4-89bf23e15fa0@b1g2000hsg.googlegroups.com
Eric Hughes writes:
> 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.
The actual subprogram may very well be nested in a package that
declares all the necessary types and variables to keep the state.
And, in Ada 2005, it is even possible to pass a null
access-to-subprogram as the formal to represent a "null aspect".
--
Ludovic Brenta.
next prev parent reply other threads:[~2008-03-06 22:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-02 17:21 default formal parameters in generic declarations Eric Hughes
2008-03-02 17:42 ` Robert A Duff
2008-03-02 19:40 ` Eric Hughes
2008-03-03 9:17 ` Dmitry A. Kazakov
2008-03-03 11:15 ` Georg Bauhaus
2008-03-03 13:56 ` Dmitry A. Kazakov
2008-03-04 16:15 ` Eric Hughes
2008-03-04 3:43 ` Randy Brukardt
2008-03-04 16:51 ` Eric Hughes
2008-03-04 18:43 ` Randy Brukardt
2008-03-05 21:08 ` Eric Hughes
2008-03-06 9:32 ` Georg Bauhaus
2008-03-06 18:05 ` Eric Hughes
2008-03-06 22:41 ` Ludovic Brenta [this message]
2008-03-07 10:51 ` Georg Bauhaus
2008-03-07 20:09 ` Eric Hughes
2008-03-03 12:42 ` Stephen Leake
2008-03-04 13:50 ` Dr. Adrian Wrigley
2008-03-04 16:56 ` Eric Hughes
2008-03-04 16:44 ` Eric Hughes
2008-03-05 13:11 ` Stephen Leake
2008-03-05 21:41 ` Eric Hughes
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox