From: Wesley Pan <wesley.y.pan@gmail.com>
Subject: Re: Gnat 2013 is out!
Date: Tue, 4 Jun 2013 10:42:53 -0700 (PDT)
Date: 2013-06-04T10:42:53-07:00 [thread overview]
Message-ID: <22c9c3a7-b898-40f9-84d1-15332a208569@googlegroups.com> (raw)
In-Reply-To: <33025e6c-b893-4c66-98f6-0fb469016583@googlegroups.com>
On Monday, June 3, 2013 7:52:07 AM UTC-7, Adam Beneschan wrote:
> On Saturday, June 1, 2013 4:51:01 AM UTC-7, Georg Bauhaus wrote:
>
> > On 01.06.13 00:07, Randy Brukardt wrote:
>
> >
>
> > > Unless the syntax makes it pretty obvious that this is a dummy, discarded
>
> > > parameter, this idea is going nowhere. (And it might very well go nowhere
>
> > > even if the syntax is perfect.)
>
> >
>
> > Can you perhaps employ the new subpools mechanism? To provide
>
> > constraints for an anonymous, "boxed object", we'd write
>
> >
>
> > My_Proc (Obj1, Obj2, Result => <> String'(1..80 => <>));
>
> >
>
> > Then, if __ stands for a subpool known only to the compiler
>
> > such as, ahem, the stack, the expansion is the impossible
>
> >
>
> > My_Proc (Obj1, Obj2, Result => (new(__) String'(1..80 => <>)).all);
>
>
>
> I'm beginning to regret opening this subject up.
>
>
>
> -- Adam
I apologize if this sounds really naive. My Ada skills is quite rusty at the moment (trying to slowly re-learn it). Why not simply make 'dummy' a new keyword? I imagine many people would call their throw away variable something like "Dummy". I definitely tend to do this for any language I am using. Assuming dummy is the keyword we would have the following:
My_Proc(Obj1, Obj2, Result => dummy String(1..80));
My_Proc(Obj1, Obj2, Result => dummy String_80);
My_Proc(Obj1, Obj2, Result => dummy Unbounded_String(1..80));
My_Proc(Obj1, Obj2, Result => dummy UString_80);
My_Proc(Obj1, Obj2, Result => dummy Some_Type);
My_Proc(Obj1, Obj2, Result => dummy Some_Type(1));
My_Proc(Obj1, Obj2, Result => dummy access Record_Type);
My_Proc(Obj1, Obj2, Result => dummy Record_Type_Access);
You can also consider using throw_away as the keyword instead of dummy.
Another alternative idea is to make a new attribute 'Temp. So we would have:
My_Proc(Obj1, Obj2, Result => String'Temp(1..80));
My_Proc(Obj1, Obj2, Result => String_80'Temp);
My_Proc(Obj1, Obj2, Result => Unbounded_String'Temp(1..80));
My_Proc(Obj1, Obj2, Result => UString_80'Temp);
My_Proc(Obj1, Obj2, Result => Some_Type'Temp);
My_Proc(Obj1, Obj2, Result => Some_Type'Temp(1));
My_Proc(Obj1, Obj2, Result => access Record_Type'Temp);
My_Proc(Obj1, Obj2, Result => Record_Type_Access'Temp);
That's my 2 cents...
-Wesley
next prev parent reply other threads:[~2013-06-04 17:42 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 13:36 Gnat 2013 is out! J-P. Rosen
2013-05-29 15:03 ` Simon Wright
2013-05-29 16:13 ` Simon Wright
2013-05-29 22:39 ` Randy Brukardt
2013-05-30 2:01 ` Adam Beneschan
2013-05-30 8:01 ` Bill Findlay
2013-05-30 23:09 ` Dennis Lee Bieber
2013-05-31 5:02 ` J-P. Rosen
2013-05-31 18:35 ` Bill Findlay
2013-05-30 10:39 ` Simon Wright
2013-05-30 16:21 ` Adam Beneschan
2013-05-30 19:53 ` Randy Brukardt
2013-05-31 7:41 ` Dmitry A. Kazakov
2013-05-31 11:30 ` Stefan.Lucks
2013-05-31 12:03 ` Niklas Holsti
2013-05-31 22:07 ` Randy Brukardt
2013-06-01 11:51 ` Georg Bauhaus
2013-06-03 14:52 ` Adam Beneschan
2013-06-04 17:42 ` Wesley Pan [this message]
2013-06-04 18:34 ` Adam Beneschan
2013-06-04 19:00 ` Wesley Pan
2013-06-05 15:40 ` Eryndlia Mavourneen
2013-06-11 2:39 ` Randy Brukardt
2013-06-11 6:31 ` Georg Bauhaus
2013-06-19 21:57 ` Randy Brukardt
2013-05-30 0:31 ` Dennis Lee Bieber
2013-05-31 16:12 ` dptrash
2013-06-01 5:10 ` Stephen Leake
2013-06-01 6:00 ` Per Sandberg
2013-06-01 6:46 ` J-P. Rosen
2013-06-01 15:22 ` Bill Findlay
2013-08-27 14:08 ` Yannick Duchêne (Hibou57)
2013-08-27 20:05 ` wilson
2013-08-27 22:59 ` Dennis Lee Bieber
2013-08-28 7:35 ` Dmitry A. Kazakov
2013-08-28 23:39 ` Dennis Lee Bieber
2013-06-07 2:41 ` gautier_niouzes
2013-06-07 15:52 ` mjsilva
2013-06-07 20:15 ` Dmitry A. Kazakov
2013-06-09 18:51 ` MatthiasR
2013-06-08 6:22 ` Simon Wright
2013-06-08 23:23 ` mjsilva
2013-06-10 11:07 ` Rego, P.
2013-06-13 13:30 ` Rego, P.
2013-06-17 6:35 ` Jacob Sparre Andersen
2013-06-22 8:17 ` MatthiasR
2014-03-18 0:04 ` Rego, P.
2013-06-11 7:52 ` Maciej Sobczak
2013-06-11 9:35 ` J-P. Rosen
2013-06-11 12:09 ` John Doe
2013-06-12 7:58 ` Maciej Sobczak
2013-06-12 11:01 ` G.B.
2013-06-12 20:01 ` Robert A Duff
2013-06-12 20:36 ` Georg Bauhaus
2013-06-13 7:38 ` Maciej Sobczak
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox