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!news2.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Don't use the "use" clause References: <1132227919.9036.51.camel@sonnenregen> <1132233886.11218.11.camel@sonnenregen> <43d5f493$1_1@glkas0286.greenlnk.net> <43p449F1ous63U1@individual.net> In-Reply-To: <43p449F1ous63U1@individual.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Wed, 25 Jan 2006 20:07:58 GMT NNTP-Posting-Host: 67.3.210.178 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1138219678 67.3.210.178 (Wed, 25 Jan 2006 12:07:58 PST) NNTP-Posting-Date: Wed, 25 Jan 2006 12:07:58 PST Xref: g2news1.google.com comp.lang.ada:2630 Date: 2006-01-25T20:07:58+00:00 List-Id: Peter Amey wrote: > 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. The ability to choose names well, like the ability to create useful abstractions, seems to be limited to a small percentage of SW developers. When you're on a project and are given Engine_Sensor_Class.Engine_Speed_Sensors and the task of implementing the turbine speed sensor interface, it's hard to get things named Sensors.Speed.Turbine.Get. Even Engine_Sensor_Class.Engine_Speed_Sensors.Turbine.Get might meet with resistance. I won't even get into the possibility that grouping all engine sensors together might be incidental packaging, and Engine.Turbine.Speed.Get might be a better approach. I've seen too many embedded projects where all the external interfaces were in one gigantic package. -- Jeff Carter "If I could find a sheriff who so offends the citizens of Rock Ridge that his very appearance would drive them out of town ... but where would I find such a man? Why am I asking you?" Blazing Saddles 37