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 05:38:48 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Let's change semantics of "use type" User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 8 Nov 2002 13:38:18 GMT Content-Type: text/plain; charset=us-ascii References: <3dcb8347$0$299$bed64819@news.gradwell.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30586 Date: 2002-11-08T13:38:18+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > 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_. Why not just "use" the package in which the type is declared? Why is this worth modifying the language? > It seems (at the first glance) that changing Standard such the way would > not make any correct program incorrect. I think you mean, "...would not change the run-time semantics". If so, I agree. >... (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. Agreed: long boring sequences of code are evil. - Bob