From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,XPRIO autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Gnat bug or mistaken program? Date: Wed, 28 Jul 2021 19:46:04 -0500 Organization: JSA Research & Innovation Message-ID: References: <318e5e93-5f66-4bb8-8bf0-7ee3fd2688fan@googlegroups.com> Injection-Date: Thu, 29 Jul 2021 00:46:05 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="27256"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:62431 List-Id: "Niklas Holsti" wrote in message news:imaos8Fii64U1@mid.individual.net... >I disagree with Jeffrey's opinion on what is a reasonable solution here. >More in-line below. You're being too hard on Jeff. See below. .... >> * Use package: this makes everything in the package visible >> >> Use pkg is clearly overkill for this case, > > I disagree. If the code uses several operators from the package, a "use > package" is apt (because "use type" does not apply here), but should of > course be as local as possible. For general advice, this makes some sense, but in this specific case, there is only one operator in this package so one of the other options makes more sense than dragging in several dozen other names. Indeed, if there are multiple uses of the operator, I'd probably use an expression function to make the operator locally visible (this is similar to renames, using the fullly qualified name). I'd only use a use package if there are many routines in the package that are commonly used and well-understood from the prespective of the system (GEF may be that for some systems, so perhaps I'm being too hard on you. :-). Side-issue: declaring operators that aren't primitive (so use-type doesn't work) is suspicious. In most cases, operators belong with the type so that they have the same visibility. The "**" for floats doesn't really belong in GEF, it was put there for practical reasons (rather than good design) -- as it is rather complex to describe and implement and isn't commonly used. Randy.