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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3dbf2f325f33ce35 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Elimination of "use" clauses Date: 1999/07/02 Message-ID: <7ljbsu$ni7$1@nnrp1.deja.com>#1/1 X-Deja-AN: 496547660 References: <377B5807.88B875E0@cs.york.ac.uk> <7lh74s$v36$1@nnrp1.deja.com> <377CE178.6C15F543@hso.link.com> X-Http-Proxy: 1.0 x21.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Fri Jul 02 21:45:05 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-07-02T00:00:00+00:00 List-Id: In article <377CE178.6C15F543@hso.link.com>, "Samuel T. Harris" wrote: > There are times when no tool can be of any help. > Doing work for NASA, we have customers which insist on > reviewing code in their private work area. With no > connectivity to our environment, they do not have > access to our tools. Some of they even require hardcopy > and reject any electronic form. Well there are people who refuse to drive automobiles, but that does not mean that we necessarily take into account those requirements in deciding how to layout our highways. You may also have customers who require Hungarian notation, but that does not mean it is a good thing. Yes, of course a dotifier (or for that matter a Hungarianizer) may be useful in bizarre environments > So the problem is not entirely handled by good tools. > Reasonable restrictions on the use clause are still > appropriate to support such edge cases. Well be careful. By supporting such edge cases, you may be making the programs harder to read and work with by everyone else. As I pointed out in a previous message, it is actually relatively unusual for people to fully qualify, that is especially true in these days of child packages. Do you really want to say: X := Ada.Numerics.Float_Random.Random (Gen); rather than X := Random (Gen); ? and that is by NO means the worst case. Well if you are really usephobic, or worse, live in an environment which mandates that use be disallowed (I have encountered such absurdities), then you end up doing a package renaming: X := NFR.Random (Gen); But this is *precisely* no help at all if you have decent tools, and creates useless noise. It does not tell you immediately where something is. The only purpose of the prefix NFR is to help you find the declaration of Random using decrepit tools. That to me is hard to justify. Once again, I think the critical factor is to consider what makes the code clearer. If you have people who insist on wasting their time by reading the code on paper, by all means get a dotifying tool and give them the entire long form above if that's what they want! Note that I am not arguing against qualification, just trying to stress that the decision to qualify should be based on factors other than the requirement of using decrepit tools. Of course there are those who have no choice. Fine, but that does not provide a source of inspiration on what ideal Ada style should be in an ideal environment. (actually for me, I agree with what someone wrote earlier, any Ada environment not providing this capability is broken and unusable as far as I am concerned). Even if you use FULL qualification, it is nowhere NEAR as convenient as going directly to the declaration with a decent tool. If you have not tried working in such an environment, give it a try, you may find it enlightening (and not have to reach so often for the baseball bat :-) Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.