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: g2news1.google.com!postnews.google.com!e20g2000vbn.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Sat, 6 Nov 2010 14:20:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <35c754f6-c38e-40b2-a600-4c7bebb3559d@e20g2000vbn.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> <7cc5dde2-8052-408c-b77f-8bf081d53cde@r14g2000yqa.googlegroups.com> 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 1289078420 5182 127.0.0.1 (6 Nov 2010 21:20:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Nov 2010 21:20:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e20g2000vbn.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: g2news1.google.com comp.lang.ada:15351 Date: 2010-11-06T14:20:19-07:00 List-Id: On Nov 6, 7:24=A0am, Robert A Duff wrote: > Shark8 writes: > > On Nov 5, 4:52 pm, Robert A Duff wrote: > >> 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. > > IMHO, you should never, ever, ever be in that situation. True enough. But sometimes you have constraints such as "must be Ada83 compilable" or somesuch. > Writing Foo."+"(Left =3D> ..., Right =3D> ...) or > Foo."+"(..., ...) completely defeats the purpose. Agreed. > You should instead say "use" or "use type". Being relatively new to Ada, I didn't know about "use type" when I ran into the problem and used dot-qualification instead of the [otherwise- needed] "use". > Or if you really want the package name, then > you shouldn't have made it an operator symbol > in the first place. I don't think it was in a package I'd wrote, I don't remember the details; just that the solution pkg."+"( Left =3D> XXX, Right YYY ) looked odd, but did what it needed. > If I were in charge, operators would always be directly > visible. =A0It's really silly that ":=3D" is always visible, > but "=3D" is not. =A0 There've been a few cases where I would have liked a 'Type attribute for variables/parameters; with such you could duplicate the GNAT- specific Var'Img via Var'Type'Image. But maybe that's getting a little too picky.