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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r14g2000yqa.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Fri, 5 Nov 2010 17:42:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7cc5dde2-8052-408c-b77f-8bf081d53cde@r14g2000yqa.googlegroups.com> References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> NNTP-Posting-Host: 174.28.219.200 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1289004152 6403 127.0.0.1 (6 Nov 2010 00:42:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Nov 2010 00:42:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r14g2000yqa.googlegroups.com; posting-host=174.28.219.200; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16280 Date: 2010-11-05T17:42:31-07:00 List-Id: On Nov 5, 4:52=A0pm, Robert A Duff wrote: > What about operators? =A0The Ada RM says: > > =A0 =A0 function "+"(Left, Right: T) return T; > > but I think that's just silly. =A0I usually say: > > =A0 =A0 function "+"(X, Y: T) return T; I have to agree with the Ada RM here, I like Left and Right as the parameter names. In justifying the usage of single-letter names for the parameters, say as in mathematics, then you ALSO have to acknowledge that "a < b" is exactly equivalent to "b < a" when 'b' and 'a' are completely free. {That is, when starting your proof you could say "let a =3D 1 and b =3D 2" just as easily, and validly, as "let be =3D 1 and a =3D 2."} > Named notation never, ever, ever makes sense for operators. > And if the body of "+" is short, single-letter > names are crystal clear. Well, except in the case where you need to specify an operator that might not be immediately visible. In that case it makes 'Left' and 'Right' into excellent parameter names as opposed to the single-letter ones. > Verbosity is good when it imparts useful information to > the reader of the code, but not otherwise. Agreed.