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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4ce0ea7d497db907 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!p6g2000pre.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: anonymous access type Date: Thu, 5 Mar 2009 10:35:35 -0800 (PST) Organization: http://groups.google.com Message-ID: <532bc1c7-6939-4085-8e53-97c6f619899d@p6g2000pre.googlegroups.com> References: <01fc8d33-ebe0-4104-a817-60e1dc6142e3@l38g2000vba.googlegroups.com> <0a9f7a86-e8f6-41d4-ba0f-1f61ca323be5@b16g2000yqb.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236278135 28325 127.0.0.1 (5 Mar 2009 18:35:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 5 Mar 2009 18:35:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p6g2000pre.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3978 Date: 2009-03-05T10:35:35-08:00 List-Id: On Mar 5, 9:50 am, Hibou57 (Yannick Duch=EAne) wrote: > On 5 mar, 16:05, Robert A Duff wrote: > > > Do you find it strange that we don't have: > > > X : constant Integer :=3D 123; > > Y : variable Integer :=3D 456; -- Not Ada! > > > ? > > - Bob > > Well done, you've got a clever point indeed. > > Perhaps the reason why I did not miss is beceause it does not belong > to the same side. When I see in/out on parameters, I see it from the > external user point of view (e.g. I'm looking at it as a user who > would like make a reference to it), while when I see your exemple, I > see it from the inner point of view (e.g. I'm inside a procedure/ > function). > > You know what ? I oftenly miss something else : beside of the > formal_parameter_selector_name [ARM2005 6.4/5], I would enjoy in/out > hints at the call statement, just to make invokation instances more > clear when a procedure can modifiy its parameters. It it not always > easy to state it in the procedure's name or in the parameter's name. > > But perhaps I'm a bit mad (may be the "explicit" concept is becoming a > kind of hard drug) I think Ada 79 or some earlier proposal had that. For named parameter associations, instead of the =3D> syntax we've gotten used to: Proc (Param =3D> Expression); the syntax was Proc (Param :=3D Expression); for IN parameters; Proc (Param =3D: Variable); for OUT parameters, and Proc (Param :=3D: Variable); for IN OUT parameters. At least that's what I recall from way back when. I suppose the language could still allow Proc (Param <=3D> Variable) for IN OUT, but of course <=3D has another use now so we couldn't use that... And I think that in Ada 79, this was only possible for named associations, not positional ones. I don't think your idea is a bad one, though, to allow (but not require) IN|OUT|IN OUT keywords in front of actual parameters (named or positional). The implementation effort for compiler maintainers would be small, I believe. -- Adam