On Fri, Feb 03, 2006 at 09:27:55AM -0500, Michael Jennings wrote:
Using it in in if conditional rather than a pre-processor ifdef
makes the code easier to read and makes debugging easier,
Wrong on both counts.
Both 'counts' are matters of opinion.
As for readability, I find it easier to read block ifs when all conditionals
are in one place and they're not spliced by pre-processor directives.
As for debugging, a. the C parser has a concept of block scopes and block
nesting, which the pre-processor doesn't (plus, you can't hit % on an ifdef...
more a defficiency of vim maybe...) b. when code is not pre-processed out, it
is error checked whether it is removed or not. That can make a big difference
when someone changes code that affects a section that is inside an ifdef.
I won't argue anymore; this isn't the place for it. In the end, it amounts to
nothing more than a religious argument.
--
Kris Maglione
Real programmers print only clean compiles,
fixing all errors through the terminal.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel