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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Use use type? (Was Re: Safety-critical development in Ada and Eiffel) Date: 1997/07/20 Message-ID: #1/1 X-Deja-AN: 257863587 References: Newsgroups: comp.lang.ada Date: 1997-07-20T00:00:00+00:00 List-Id: On Sat, 19 Jul 1997, Robert A Duff wrote: > Jon S Anthony wrote: > >I quite agree. What I found odd (at best) about the "use type" thing > >in Ada95 was that it doesn't really "use type" - you only get the > >operators - a kind of "half-use type". > > What *I* find odd is that in something like: > > while X /= null loop > ... > X := X.Next; > end loop; Agreed on both oddnesses. > I can see "null" and ":=" without any use_clause, but I can't see "/=". > And if I don't like use_clauses, the way to get visibility on "/=" is to > rename "="! (Or else to use the intolerably horrible Package_Name."/=".) > (Actually, I'm not use_clause-phobic.) Great. The discussions of whether or not to use use clauses reminds me of the "goto" discussion, and infix operator overloading discussions, and all of the other "X considered harmful" discussions. Sure, whacky use of use clauses can cause messes, but so can whacky use of function naming (say I name my "remove all files" procedure "print") and no one has suggested removing it and just using the untyped lamda calculus and Y combinators! > By the way, "use type" was a compromise. The language designers > originally wanted to make primitive operators directly visible always. > But that would have been slightly upward incompatible. So we settled on > "use type". I have always wondered about this, but I never asked. Perhaps we need a "Design and Evolution of Ada 95" to answer some of these questions. Do you have the values of YY, MM, and DD that I need to find the discussion in the mrtcomments list? I'm curious because I want to know how you all resolved the tension between fixing (perceived) flaws and breaking backwards compatibility. Making primitive operators always directly visible seems like the right approach; what would the extent of the incompatibility have been? Personally, I don't like "use type", and think it was a mistake, but my mind has been changed on important Ada issues (downard funargs :-) after I read the discussions. > Another pet peeve: In order to use Some_Package, you say "with > Some_Package;". I don't get it. Do you disagree with the choice of names for "with" and "use", with the fact that "use" doesn't implicitly "with", or something else altogether? -- Brian