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-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder3.news.weretis.net!news.szaf.org!news.gnuher.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: AWS Coding Styles (and about boring plain-linear text files in the end) Date: Tue, 18 Jan 2011 21:44:32 +0100 Message-ID: <8739oqdjrj.fsf@mid.deneb.enyo.de> References: <24418fa4-8843-4fe6-8c2f-026ea6009b68@g26g2000vbz.googlegroups.com> <87lj2ido9j.fsf@mid.deneb.enyo.de> <4dc188a3-468c-40eb-9f3c-85bfb621cb23@o14g2000prn.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ruchba.enyo.de 1295383472 4878 172.17.135.6 (18 Jan 2011 20:44:32 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:rpDMdNOOIL1Crz1Q5g+Dx6KokCU= Xref: g2news2.google.com comp.lang.ada:17498 Date: 2011-01-18T21:44:32+01:00 List-Id: * Adam Beneschan: > Maybe that's what the style guide author intended. If so, I think he > had it completely backward. Look at the RM's descriptions of what the > subprograms in language-defined packages do, and then try to figure > out how to describe them without referring to parameter names. Try > Ada.Strings.Unbounded.To_String and To_Unbounded_String, for example, > in A.4.5(78-79). That'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". Anyway, 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 | function To_Unbounded_String (Source : in String) | return Unbounded_String; | 11 | function To_String (Source : in Unbounded_String) return String; | 78 | * If S is a String, then To_String(To_Unbounded_String(S)) = S. | | 79 | * If U is an Unbounded_String, then | To_Unbounded_String(To_String(U)) = U. | So this description does not use the formal parameter names at all!