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,429176cb92b1b825 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!22g2000prx.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: AWS Coding Styles (and about boring plain-linear text files in the end) Date: Tue, 18 Jan 2011 13:03:23 -0800 (PST) Organization: http://groups.google.com Message-ID: <352ea557-f9ea-4347-b59d-9159ca2ab075@22g2000prx.googlegroups.com> References: <24418fa4-8843-4fe6-8c2f-026ea6009b68@g26g2000vbz.googlegroups.com> <87lj2ido9j.fsf@mid.deneb.enyo.de> <4dc188a3-468c-40eb-9f3c-85bfb621cb23@o14g2000prn.googlegroups.com> <8739oqdjrj.fsf@mid.deneb.enyo.de> 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 1295384603 15378 127.0.0.1 (18 Jan 2011 21:03:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 18 Jan 2011 21:03:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 22g2000prx.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:17499 Date: 2011-01-18T13:03:23-08:00 List-Id: On Jan 18, 12:44=A0pm, Florian Weimer wrote: > * Adam Beneschan: > > > Maybe that's what the style guide author intended. =A0If so, I think he > > had it completely backward. =A0Look at the RM's descriptions of what th= e > > subprograms in language-defined packages do, and then try to figure > > out how to describe them without referring to parameter names. =A0Try > > Ada.Strings.Unbounded.To_String and To_Unbounded_String, for example, > > in A.4.5(78-79). =A0That's just the first thing I went to when I picked > > an Annex A section more or less arbitrarily---I didn't have to hunt > > for the "best example". =A0Anyway, you *could* rewrite the description > > in a way that doesn't refer to the parameter names, but all you gain > > is verbosity and stilted-sounding language---at the expense of > > clarity, readability, and several dozen of your readers' brain cells. > > Huh? > > In my version, I've got: > > | 9 > | =A0 =A0 =A0 =A0 function To_Unbounded_String (Source : in String) > | =A0 =A0 =A0 =A0 =A0 =A0return Unbounded_String; > | 11 > | =A0 =A0 =A0 =A0 function To_String (Source : in Unbounded_String) retur= n String; > > | 78 > | =A0 =A0* If S is a String, then To_String(To_Unbounded_String(S)) =3D S= . > | > | 79 > | =A0 =A0* If U is an Unbounded_String, then > | =A0 =A0 =A0To_Unbounded_String(To_String(U)) =3D U. > | > > So this description does not use the formal parameter names at all! Son of a (*&#$(*&, I found the one section of A.4.5 that used names other than the formal parameter names. [Note that it doesn't try to use English text instead of the formal names, but rather substitutes its own algebra-like variable name.] OK, then, look at most of the rest of A.4.5, or A.16, or A.10.5 other than the File parameter. But I'll take back one thing I said---the RM isn't as consistent as I thought. 11.4.1 seems to avoid using formal parameter names. In 3.9, it looks as though the pre-Ada 2005 material tried to avoid using formal parameter names, but subprogram descriptions added later did not. I'll stand by most of what I said, though. Much or most of the RM uses formal parameter names in the descriptions, and I believe that avoiding formal parameter names gains nothing and often loses. -- Adam