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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9768c08202fdbbb1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 03:02:55 PST Date: Fri, 08 Nov 2002 20:01:48 +0800 From: Adrian Hoe User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Let's change semantics of "use type" References: <3dcb8347$0$299$bed64819@news.gradwell.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: akh-131-95.tm.net.my X-Original-NNTP-Posting-Host: akh-131-95.tm.net.my Message-ID: <3dcb9851_2@news.tm.net.my> X-Trace: news.tm.net.my 1036752977 akh-131-95.tm.net.my (8 Nov 2002 18:56:17 +0800) Organization: TMnet Malaysia Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news1.tm.net.my Xref: archiver1.google.com comp.lang.ada:30578 Date: 2002-11-08T20:01:48+08: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_. > > It seems (at the first glance) that changing Standard such the way would > not make any correct program incorrect. (However it would make some current > programs not compilable. If this is too bad, it can be instead denoted as > "use all type;" for using all operations, not only operators.) > > The rationale is that this is a convenient way for dealing with a type > imported from a package without the need of many rename directives. These > directives may make a long list and are "dirty" for both writing and > reading. (Reading this list one may not understand for exactly what is > present an item of the list and so not know (without experiment with a > compiler) whether this item can be removed without breaking the program. > So in certain sense the current Ada is not perfectly readable.) With "use > all type" programmers will less tend to write multi-level designators > which are both unreadable (especially when there are several such > designators in an expression) and error-prone as one may forget y in > x.y.z (mistakedly writing x.z) and get wrong behavior of the program. > Without the rename directives, the program will be difficult to understand. With your suggestion of "use all type" may be good for short programs but not "large" program. I would prefer current standards for a typical large with hundreds thousand lines of code (if not million) will be easily understood. -- type Dmitry is new Adrian; -- Adrian Hoe -- http://adrianhoe.com -- Remove *nospam* to email