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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: some trivial questions? Date: Fri, 17 Nov 2017 19:27:20 -0600 Organization: JSA Research & Innovation Message-ID: References: <6a5368c5-f015-4dcb-9291-e77b40fa1bf1@googlegroups.com> <1510001599.30535.24.camel@obry.net> <1510002854.30535.27.camel@obry.net> Injection-Date: Sat, 18 Nov 2017 01:27:21 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="16273"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: feeder.eternal-september.org comp.lang.ada:48975 Date: 2017-11-17T19:27:20-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:oum79h$1c7v$1@gioia.aioe.org... > On 17/11/2017 01:57, Randy Brukardt wrote: > >> Janus/Ada doesn't >> warn about most of those things (they're not wrong, and they don't cause >> any >> performance problems, either at compile-time or runtime, so why worry?) > > Because if you support the view that "with" makes any sense then > with-clauses should be written consistently with that sense. If manual > maintaining of dependencies is felt so important then the compiler should > assist that practice unless considered wrong. > > I always remove redundant clauses because they are heavy maintenance > problem. Some stray "with" can cause elaboration order problem which may > stay undetected till the end of build cycle which in my case takes whole > week. It is very nasty, I has it a couple of times. I didn't mean to imply that I leave junk withs around when I know about them. But elaboration problems only can come from withs in specifications, and most of the code I work on doesn't with much in each spec. (Janus/Ada has a handful of packages of type declarations that are withed into pretty much every unit, but pretty much everything else is only withed in bodies.) But I can see how you could get elaboration problems, especially with an object-oriented design. (Janus/Ada predates object-oriented programming; the only object-oriented language that I had heard if in 1980 was Simula, and there was no practical implementations of that.) Our experience with elaboration and elaboration control in Janus/Ada was so bad that we essentially abandoned it for doing anything and went back to explicit initializer subprograms (which we could ensure got called in the correct order). As such, we rarely had elaboration issues. Randy. P.S. A one week build? Yuck. I don't think we ever had anything longer than about 12 hours, even back on very early MS-DOS. Of course, the compiler was a lot smaller (and less complete) back then. Running the entire ACATS took a week, but you could run individual chapters in a few hours each.