[Oberon] Conditional compilation using IF const THEN
paulreed at paddedcell.com
Sun Aug 12 14:16:15 CEST 2018
>> A) add code to only parse. Something like a clever
> Generally though, I believe this would be optimization at the wrong
> place. The compiler is not not here to correct bad programming habits.
Agreed! The compiler is more valuable (not less!) because it sticks to
There is, after all, even in something as small as Project Oberon, a fast,
low-overhead, very fine-grained, type-safe module loader available...
The Linux kernel went with the module-loader approach eventually, not to
pay for code you're not using.
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
More information about the Oberon