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,900edaa189af2033 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Ada95 OOP Questions Date: 1996/08/06 Message-ID: #1/1 X-Deja-AN: 172541167 references: <4u7h1r$jrn@mailsrv2.erno.de> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-08-06T00:00:00+00:00 List-Id: In article <4u7h1r$jrn@mailsrv2.erno.de>, Thomas Kendelbacher wrote: >I'm not advocating a ban on use clauses at all; indeed, I do use use myself >quite often, especially for the typical case of certain base packages >which are "with"ed everywhere in a certain project (you mentioned examples >from GNAT itself.) ... A useful thing to do is: Suppose you have 17 packages that are with-ed pretty much everywhere. Do you put 17 with-clauses on every package? Not very readable, IMHO, since the reader's eyes tend to glaze over with all those with_clauses, since they're all more-or-less the same. Instead, you can make an empty library package, and put the 17 with's on it, and make the rest of your software children of that empty parent. Of course, in doing that, you require the reader to memorize all 17 of those packages, which you shouldn't do unless they really are globally used all over the place. Maybe 17 is a bit high... >>As in all style matters, I don't like absolute rules, > >--neither do I!-- Nor me. But since we haven't defined what "style" means, this is pretty meaningless. There are some rules in the RM that could be considered "style rules", and yet they are absolute -- the compiler will complain if you violate them. An absolute rule like "never use unchecked conversions" is bad. But an absolute rule like "never use unchecked conversions without saying so" is good (and that's what the RM says, since it requires a "with Unchecked_Conversion;" at the top). Both rules are absolute, but one is good and one is bad. Of course another good rule is, "Don't use unchecked conversions unless necessary", but the RM doesn't say that, since it's a matter of opinion. - Bob