guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #if vs #ifdef


From: Dale P. Smith
Subject: Re: #if vs #ifdef
Date: Thu, 27 Mar 2003 07:48:05 -0500

On Thu, 27 Mar 2003 00:18:08 -0600
Rob Browning <address@hidden> wrote:

>                                              Their argument is that all
> reasonable compilers will generate the same code either way, and using
> C code rather than the preprocessor can substantially improve the
> readability of the code and allow the C compiler to do more thorough
> analysis of all code paths.

I agree that nested #if's are a horrible thing to wade through, and it
makes sense to do this.  On the other hand, aren't there modes in emacs
that allow you to hide the #if'ed out code?  That would improve
readability far more than if (..).

I don't understand how it better for the compiler though.  I would think
using #if's effectively edits the code out of the way before the
compiler has a chance to look at it.  Using if (..) gives the compiler
useless work to do.  How is theis better?

-Dale

-- 
Dale P. Smith
Senior Systems Consultant,      | Treasurer,
Altus Technologies Corporation  | Cleveland Linux Users Group
dsmith at altustech dot com     | http://cleveland.lug.net
440-746-9000 x239               |




reply via email to

[Prev in Thread] Current Thread [Next in Thread]