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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.53.198 with SMTP id n6mr16913396qag.2.1370367773598; Tue, 04 Jun 2013 10:42:53 -0700 (PDT) X-Received: by 10.49.71.232 with SMTP id y8mr2162916qeu.19.1370367773582; Tue, 04 Jun 2013 10:42:53 -0700 (PDT) Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder1.xlned.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.85.216.88.MISMATCH!ch1no826652qab.0!news-out.google.com!y6ni221qax.0!nntp.google.com!ch1no826650qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 4 Jun 2013 10:42:53 -0700 (PDT) In-Reply-To: <33025e6c-b893-4c66-98f6-0fb469016583@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=199.46.200.232; posting-account=84ieUgoAAAAnUS2e_T521zfeUcALYrrJ NNTP-Posting-Host: 199.46.200.232 References: <32d94173-533a-471e-95a0-abb73a6cdcc2@googlegroups.com> <51a9e025$0$9521$9b4e6d93@newsspool1.arcor-online.net> <33025e6c-b893-4c66-98f6-0fb469016583@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <22c9c3a7-b898-40f9-84d1-15332a208569@googlegroups.com> Subject: Re: Gnat 2013 is out! From: Wesley Pan Injection-Date: Tue, 04 Jun 2013 17:42:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 4129 Xref: number.nntp.dca.giganews.com comp.lang.ada:181795 Date: 2013-06-04T10:42:53-07:00 List-Id: 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: >=20 > > On 01.06.13 00:07, Randy Brukardt wrote: >=20 > >=20 >=20 > > > Unless the syntax makes it pretty obvious that this is a dummy, disca= rded >=20 > > > parameter, this idea is going nowhere. (And it might very well go now= here >=20 > > > even if the syntax is perfect.) >=20 > >=20 >=20 > > Can you perhaps employ the new subpools mechanism? To provide >=20 > > constraints for an anonymous, "boxed object", we'd write >=20 > >=20 >=20 > > My_Proc (Obj1, Obj2, Result =3D> <> String'(1..80 =3D> <>)); >=20 > >=20 >=20 > > Then, if __ stands for a subpool known only to the compiler >=20 > > such as, ahem, the stack, the expansion is the impossible >=20 > >=20 >=20 > > My_Proc (Obj1, Obj2, Result =3D> (new(__) String'(1..80 =3D> <>)).a= ll); >=20 >=20 >=20 > I'm beginning to regret opening this subject up. >=20 >=20 >=20 > -- Adam I apologize if this sounds really naive. My Ada skills is quite rusty at th= e 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 somethi= ng 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 =3D> dummy String(1..80)); My_Proc(Obj1, Obj2, Result =3D> dummy String_80); My_Proc(Obj1, Obj2, Result =3D> dummy Unbounded_String(1..80)); My_Proc(Obj1, Obj2, Result =3D> dummy UString_80); My_Proc(Obj1, Obj2, Result =3D> dummy Some_Type); My_Proc(Obj1, Obj2, Result =3D> dummy Some_Type(1)); My_Proc(Obj1, Obj2, Result =3D> dummy access Record_Type); My_Proc(Obj1, Obj2, Result =3D> dummy Record_Type_Access); You can also consider using throw_away as the keyword instead of dummy.=20 Another alternative idea is to make a new attribute 'Temp. So we would have= : My_Proc(Obj1, Obj2, Result =3D> String'Temp(1..80)); My_Proc(Obj1, Obj2, Result =3D> String_80'Temp); My_Proc(Obj1, Obj2, Result =3D> Unbounded_String'Temp(1..80)); My_Proc(Obj1, Obj2, Result =3D> UString_80'Temp); My_Proc(Obj1, Obj2, Result =3D> Some_Type'Temp); My_Proc(Obj1, Obj2, Result =3D> Some_Type'Temp(1)); My_Proc(Obj1, Obj2, Result =3D> access Record_Type'Temp); My_Proc(Obj1, Obj2, Result =3D> Record_Type_Access'Temp); That's my 2 cents... -Wesley