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=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,707e18bffca9c9cd,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.85.37 with SMTP id e5mr1473415paz.31.1344319645834; Mon, 06 Aug 2012 23:07:25 -0700 (PDT) Path: g9ni2695850pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: question on using `with` without `use` and visibility of operators such as '*' Date: Mon, 30 Jul 2012 01:04:34 -0500 Organization: Aioe.org NNTP Server Message-ID: Reply-To: nma@12000.org NNTP-Posting-Host: 9ii5QNw33OfeoTzEH8w9ug.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-30T01:04:34-05:00 List-Id: I prefer to use the long name of a package when I call some of its functions. So I like to write ------------------------ with package_foo; package_foo.function_name(); ----------------------- rather than ----------------------- with package_foo; use package_foo; function_name(); ---------------------- So that when reading the code, I know where things are. This worked well so far, but when the package happened to export functions/operators such as '*' or "+" for the types, then it will not work any more. i.e. I really want to just write x * y where x,y are variables with types defined in the package, and not write x package_foo("*") y (or whatever the correct syntax would be) This is annoying. It means I have now to `use package_foo` to be able to write x*y, since "*" is defined in the package. Is there a way around this, so I can avoid using `use` but still be able to just write x * y (may be use something like `use package_foo("*") at the top if this possible) I can provide example if needed. The error I get are of the form there is no applicable operator "*" for type ..... This error goes away when I add `use package_foo` (Ada is so picky !) thanks, --Nasser