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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e3f2eac5c026e3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-29 03:22:34 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-040-212.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Other Ada Standards (was Re: SIGada Conference) Date: Mon, 29 Dec 2003 12:28:56 +0100 Organization: At home Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <3FEB047A.1040100@noplace.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-040-212.arcor-ip.net (145.254.40.212) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1072696953 15516637 145.254.40.212 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3919 Date: 2003-12-29T12:28:56+01:00 List-Id: Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: > : I find "with"-ing boring. I cannot remember any case they helped me to > : solve any problem. > > They might help others solving a problem :-) > with clauses might mark stars, followers, and independents in a network of > dependent units. Many with clauses -> unit is very likely a star. > If there are many stars, and no clique, something could be > wrong. In this sense with clauses document design and might indicate > problems. I think that children packages do the job much better. They have a substance, they extend/implement parents. As for "with", they lack any substance. A program with a superfluos "with" remains valid, always. This is an important sign. For example, "use" has a substance, because you can break a program if you add a "use" causing a name conflict. BTW, if there where a way to prevent name conflicts I would argue to get rid of "use". Unfortunately there is no one. > As an example, think of a class that takes on several roles but does > so only by way of a single huge collection of state variables cobbled > together. (The (Java) class I am thinking of still exist; there is > some hope that it will be replaced .-) > That is, the states could have been grouped semantically > but have not been grouped using language means for grouping. Can > one build this class without a long list of with clauses somewhere > (or by writing a larger number of "provider" packages nested in the > same block so they can be seen where the type is declared, > or worse, a large package providing everything)? It is an interesting problem. There is a similar problem with ADT - "fat classes". The base types tend to rapidly grow by adding more and more primitive operations. It is very difficult to keep new pritive operations in derived types, against the "gravity" force which attracts everything to the base. > Maybe it is easier to think about the correctness of what is happening > inside a package if the number of with clauses is low? > > : Moreover careless designers tend to "with" everything > : they can. > > So "with" is a useful indicator to maintainers? Oh yes, but the number of source code lines is also an indicator. Should we follow Basic by explicit numbering them? The point is that, yes, the package dependencies is an important metric. But this by no means implies a necessity to force a designer to *manually* measure it and then include it in the code! -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de