[Oberon] Conditional compilation using IF const THEN
Chris Burrows
chris at cfbsoftware.com
Sun Aug 12 14:45:58 CEST 2018
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Paul Reed
> Sent: Sunday, 12 August 2018 9:46 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Conditional compilation using IF const THEN
>
> Also I believe that Prof. Wirth mentions somewhere a comment by Tony
> Hoare that C-style conditional compilation of the form #if DEBUG /
> ... / #endif is like learning to swim in a pool with flotation
> assistance and then abandoning it the first time you swim in the sea!
> :)
>
> It's certainly bad practice to be intentionally debugging a different
> program than the one you intend to ship to customers, although it's
> often done.
>
I agree totally with that. Particularly if you are disabling runtime error
trapping.
I was thinking of conditional compilation in the context of avoiding lots of
duplication when supporting many different targets with very similar code,
Regards,
Chris
More information about the Oberon
mailing list