News for hackers. Stuff that matters.
Re:Walter Bright on C's Biggest Mistake by coliveira on Thursday December 24, 2009 @11:28PM (#1014757)
I think the preprocessor is the biggest mistake. It was introduced to address issues of separate compilation in a simple way, but it generated more trouble than advantages.
Re:Walter Bright on C's Biggest Mistake by __david__ on Friday December 25, 2009 @03:12AM (#1014854)
I understand the issues with the pre-processor, but I still think C is better off with it than without it. I know it can be abused horrifically but it can also be abused in really nice and convenient ways. If you construct you macros right they can be useful or even wonderful. In that sense the pre-processor is very C-like.

The things that makes macros actually nice are some of the gcc extensions, like the ({ }) block expression syntax and typeof().

Re:Walter Bright on C's Biggest Mistake by agazso on Friday December 25, 2009 @07:10AM (#1014970)
Macros can easily be abused, but the point of the preprocessor today is platform-dependent code generation. In higher level languages you can select with an if which branch gets executed, but at the end the platform-dependent code of that language runtime is written in C with ugly ifdef's.
Re:Walter Bright on C's Biggest Mistake by vorador on Friday December 25, 2009 @04:34AM (#1014897)
Which issues has the preprocessor ?
Re:Walter Bright on C's Biggest Mistake by duairc on Friday December 25, 2009 @08:03AM (#1014986)
I disagree. I've only recently started programming in C properly, having only programmed before in various dynamic scripting languages, Haskell and Java before. Macros are by far my favourite feature of C.