Levi Pearson wrote:
If debug is defined as a constant, the code ought to be completely eliminated by any reasonable compiler. Why keep dead code around? C-style preprocessing is pretty much the worst possible way to do most of the things it does, but at least it does them in a fairly simple and consistent manner.
I'm surprised no one has mentioned Aspect Oriented Programming for debugging, which to me is a textbook no-brainer application. It operates (potentially) directly on the parse tree and should be ideal for removing/adding debugging code at build time (or even run time). Is it dead?
--Dave /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
