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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a687662f09731bb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Peter Amey Newsgroups: comp.lang.ada Subject: Re: Don't use the "use" clause Date: Wed, 25 Jan 2006 11:01:28 +0000 Message-ID: <43p449F1ous63U1@individual.net> References: <1132227919.9036.51.camel@sonnenregen> <1132233886.11218.11.camel@sonnenregen> <43d5f493$1_1@glkas0286.greenlnk.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net kahhTYyIgXgD4f+tGHsCYgL6jiJ7b4hWlayrfnI7y3MNPtFs8= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: <43d5f493$1_1@glkas0286.greenlnk.net> Xref: g2news1.google.com comp.lang.ada:2625 Date: 2006-01-25T11:01:28+00:00 List-Id: Martin Dowie wrote: > Stephen Leake wrote: > >>>Right. The OP might want to use SPARK, which does not have use >>>clauses. >> >>That seems odd. What does SPARK gain by outlawing use clauses? Surely >>the examiner can handle the extra name resolution! > > > But the human reader can't handle the extra name resolution! :-) > I haven't followed all of this thread but do wonder if poor initial name choice is sometimes a driver for the desire to employ "use"? I think the original topic was Ada Quality and Style so naming may be on topic anyway. I think the trick is to choose names knowing that they will be read in sequences separated by dots. Then the desire to strip away chunks of the name becomes less pressing. I often see (ghastly) things like: Engine_Sensor_Class.Engine_Speed_Sensors.Turbine_Speed.Read_Turbine_Speed no wonder people want to employ use clauses to shorten it! If instead we had: Sensors.Speed.Turbine.Get then a use clause is less useful and might even be positively misleading. A side benefit of banning "use" (but not "use type") which we do in SPARK, is it encourages this kind of naming because nobody ever has to worry about what a name might look like with bits of it missing. Peter