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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a327d56b3d5e9a4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-13 08:35:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!smallfeed.triton.net!triton.net!newsfeeder.triton.net!news-peer.gradwell.net!not-for-mail Newsgroups: comp.lang.ada From: porton@ex-code.com (Victor Porton) Date: Wed, 13 Nov 2002 20:40:26 +0500 References: <3dcbb4e4$0$299$bed64819@news.gradwell.net> Organization: Extreme Code Software (http://ex-code.com) Subject: Re: Booch: iterator invalidation Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Content-Type: text/plain; charset=us-ascii X-URL: http://www.ex-code.com/ Message-ID: <3dd27f36$0$303$bed64819@news.gradwell.net> NNTP-Posting-Date: 13 Nov 2002 16:35:02 GMT NNTP-Posting-Host: 195.149.39.13 X-Trace: 1037205302 news.gradwell.net 303 mail2news/195.149.39.13 X-Complaints-To: news-abuse@gradwell.net Xref: archiver1.google.com comp.lang.ada:30814 Date: 2002-11-13T16:35:02+00:00 List-Id: In article , Stephen Leake writes: > porton@ex-code.com (Victor Porton) writes: > >> >> type T is T_Internal(Use_Debug); -- Use_Debug is a Boolean _constant_ >> >> >> >> Will this not bring "additional debugging stuff" in the release >> >> version (when Use_Debug=False)? >> > >> > Now everything that uses T_Internal has to specify a Debug >> > discriminant. To intrusive for my taste. >> >> It is meant for user code to use _only_ T, not T_Internal. >> (In OO style T_Internal should be in private section.) > >> All compiler implementors should consider this to ensure that >> they have zero space-efficiency. > > I'm not clear what you mean here. I suppose if the compiler could > prove that _every_ instance of T_Internal had the same value for > Use_Debug, it could optimize stuff. But that seems like a lot of work. > Any time T_Internal is passed as a subprogram parameter, you'd either > have to inline the subprogram or do full data-flow analysis. I meant the case when _all_ except of debug (like Dump, Check, Throw_If_Invalid) rountines use only T, not T_Internal.