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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9768c08202fdbbb1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-17 17:18:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: Let's change semantics of "use type" Date: Sun, 17 Nov 2002 17:25:51 -0800 Organization: AdaWorks Software Engineering Message-ID: <3DD8419F.97C1A8@adaworks.com> References: <3dcb8347$0$299$bed64819@news.gradwell.net> Reply-To: richard@adaworks.com NNTP-Posting-Host: 41.b2.40.49 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 18 Nov 2002 01:18:26 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:31016 Date: 2002-11-18T01:18:26+00:00 List-Id: Victor Porton wrote: > I am suggesting (for the next Standard) to change the semantics of "use > type" so that it would make visible not only primitive _operators_, but > all primitive _operations_. > Snipped the explanatory text. We should be cautious about adding features to the Ada language that will dilute its essential power. We should be wary of trying to make Ada look like something else in pursuit of a potentially ephemeral popularity. Ada is what it is: a language designed to enable the compiler to detect the maximum number of errors as early in the development process as possible and to continue catching errors during execution and over the full life-cycle of the maintenance process. Since Dr. Dewar has chosen to suspend his contributory edification to comp.lang.ada for a while, it is probably worthwhile to recall one of his most memorable and most important admonishments about Ada versus other programming languages. "Ada is meant to be more readable than writeable." A corollary to this is that Ada is intended to be more traceable than writeable. Anyone who has had the entertaining experience of slogging through pages of C or C++ code in search of (yes, I know there are tools for this) some function or variable knows the importance of this. I am not a big fan of use type. Frankly, I still believe that, for really well-engineered software, the renaming of the operator is still a good practice when there is only one. As an alternative, renaming the exact operators needed in a child package and using that is better than a use type clause. Dot notation serves a very useful purpose. So does named association. In production code on weapon systems, both are essential. Toy programs and small programs don't require this kind of rigor. Programs that are long-lived and on which we expect a lot of maintenance do benefit from dot notation. While it is more and more common to create software with a brief lifetime in the Internet world, this is not so common in the large-scale software world. Richard Riehle