News for hackers. Stuff that matters.
Re:The Good, the Bad, and the Ugly: The Unix Legacy (by Rob ... by devin on Thursday May 07, 2009 @04:07AM (#597632)
"And yes I saw the thing about Plan 9 compiling a kernel for all arch's with no ifdefs - well they only way you can do that is by cheating and either making your own preprocessor, or a fancy makefile. So big whoop."

I think that's a rather reductionist assessment. See: http://ntu.csie.org/~piaip/plan9/archives/000005.html

Re:The Good, the Bad, and the Ugly: The Unix Legacy (by Rob ... by ars on Thursday May 07, 2009 @04:19AM (#597636)
"Conditional compilation, even with #ifdef, is used sparingly in Plan 9. The only architecture-dependent #ifdefs in the system are in low-level routines in the graphics library."

So, in other words - yah, you need need a preprocessor with ifdef's, because sometimes there is no other way to do it.

And in other places he basically says he avoided ifdef's by using a fancy makefile, which doesn't seem an improvement to me, since the makefile essentially becomes a (less flexible) pre-processor.

The point about dead-branch pruning instead of ifdef is well taken though. (But there are cases where that doesn't work.)