On 5/13/14, 2:35 PM, bearophile wrote:
Gary Willoughby:
Without trying to sound condescending, if you need to pass certain
arguments only in debug builds something has gone terribly wrong with
the design of your program. IMHO good OOP design would remove the need.
I think often OOP obfuscates the actual flow of data between functions
(methods). So I even suggested to give D a kind of its opposite:
https://d.puremagic.com/issues/show_bug.cgi?id=5007
In the debug build inside some functions I print some of the current
state, as modified by a function. The extra arguments for the debug
build are needed to produce a better or more complete print. But in
release builds I'd like to avoid passing extra arguments that are useless.
Bye,
bearophile
IMHO the compiler should be able to remove the unused arguments for you.