From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Booch: iterator invalidation
Date: 12 Nov 2002 15:11:31 -0500
Date: 2002-11-12T20:22:26+00:00 [thread overview]
Message-ID: <uptta4kgc.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 3dd14654$0$300$bed64819@news.gradwell.net
porton@ex-code.com (Victor Porton) writes:
> I'm not about asserting but about records which have or don't have
> a component dependingly on whether it is the debuging version.
Hmm. I've never done that for testing. Can you give a real example?
What sort of "additional information" would you add?
I've used "debug storage pools" that report statistics on
allocations/deallocations. I guess that is a form of what you are
talking about here.
Part of the point of "debug stuff" is that it ideally should have
_zero_ impact on the "real code". "pragma Assert" comes very close to
that; the optimizer may do things differently when it is turned on,
but nothing else changes.
> Can variant records be used for this without lost of space
> efficiency?
>
> type T_Internal(Debug: Boolean) is
> record
> -- ...
> case Debug is
> when True =>
> -- ... additional debugging stuff
> when others =>
> null;
> end case;
> end record;
>
> 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.
--
-- Stephe
next prev parent reply other threads:[~2002-11-12 20:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 12:51 Booch: iterator invalidation Victor Porton
2002-11-08 13:26 ` Jeffrey Creem
2002-11-08 21:00 ` Randy Brukardt
2002-11-08 18:05 ` Victor Porton
2002-11-09 14:20 ` Simon Wright
2002-11-12 16:50 ` Stephen Leake
2002-11-12 18:28 ` Robert A Duff
2002-11-12 20:09 ` Simon Wright
2002-11-13 14:49 ` Stephen Leake
2002-11-12 17:42 ` Victor Porton
2002-11-12 20:11 ` Stephen Leake [this message]
2002-11-13 2:43 ` Victor Porton
2002-11-13 14:56 ` Stephen Leake
2002-11-13 15:40 ` Victor Porton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox