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: <7ljb4e$na9$1@nnrp1.deja.com>#1/1 X-Deja-AN: 496544061 References: <377B5807.88B875E0@cs.york.ac.uk> <7lh74s$v36$1@nnrp1.deja.com> <7ligdq$c8q$1@nnrp1.deja.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:31:58 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 <7ligdq$c8q$1@nnrp1.deja.com>, Ted Dennison wrote: > While I appreciate the fact that *some* compiler systems have > facilites to help decipher stuff like this under *certian* > circumstances, I am not > persuaded that obtuse source code is just a "tool problem". Actually there are many of us who feel that using dotted notation all over the place actually obscures the code, especially once you know it fairly well. I personally find the dots annoying -- why? well you have far more text which is conveying no more semantic information. I find this only one step removed from the use of Hungarian notations. Of course I realize other people differ, but there are two kinds of use phobes: a) people who really prefer the dots b) people who put up with the dots because it is the only reasonable way they have of finding things Please understand that my message is addressed exclusively to the second group :-) > If I have to use specialized tools to figure out what > someone's source code is doing, the tool that springs most > readily to mind is a baseball bat... In a decent Ada environment, this should not be considered a specialized tool, but rather a necessity. Note that even most use phobes can't stand to dot operator names, so at the very least you need the tool that allows you to click on an operator name and find out where the operator is defined. Note that many people can't stand to put the full package names on the dots anyway, so you get notations like CT.List instead of Compressed_Tree.List Now you have to first find CT to know where things are. How will you find CT? Well you use some tool. Perhaps you use some decrepit tool like the search of an editor. But it would be better to use the click and find procedure even for CT if you have decent tools. If you have these decent tools, then you might as well click on List and get where you really want to go. I am sorry Ted has to deal with such a decrepit environment that the challenge of finding out where a variable is defined makes him reach for the baseball bat, but I am not at all sure that we should condition our style on the limitations of such environments. The decision to use or not use USE clauses should be based on what makes the code clearer, not on entirely unreasonable and unnecessary limitations of tool sets. Probably the majority of Ada programmers fall between the ALWAYS and NEVER use groups, and instead take a reasonable approach of using USE where appropriate, and not using it where it is not helpful. Robert Dewar Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.