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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.ada Subject: Re: Limited Use Clause Message-ID: <4154@enea.se> Date: 10 Dec 88 23:13:54 GMT Organization: ENEA DATA AB, Sweden List-Id: Steve Tynor (tynor@pyr.UUCP) writes: >But why limit this to only infix operators? How about borrowing an idea >from Modula2? > > with XYZ; > use XYZ."=", XYZ."/=", XYZ.PUSH, XYZ.POP; > package ... The problem is that the specifications above are not necessarily unique. So you have to write: use XYZ."="(a, b : XYZ_type), XYZ.Push(x : some_type) ... which quickly gets very verbose. The original idea that there should be method for making only infix operators directly visible seems attractive to me. A := B My_type."+" C looks really ugly. As for those who wanted the APSE to handle the problems with USE: The code I want to read is the code I am to maintain. I prefer not having to look up cross-reference lists for every name I meet. (Particulary cumbersome if you read the program on the Underground on your way home.) Let me also add that you have to have your USE clause in the head of the package. A USE clause can appear in any declarative section. A local USE is not so confusing as a global one. -- Erland Sommarskog ENEA Data, Stockholm sommar@enea.se "Frequently, unexpected errors are entirely unpredictable" - Digital Equipment