[GD-General] RE: Preprocessors
Brought to you by:
vexxed72
From: Jesse J. <jes...@mi...> - 2002-01-03 11:07:07
|
At 12:20 PM -0800 1/2/02, Steve Rabin wrote: > > Or the belief that languages shouldn't have preprocessors because the >> C preprocessor was so gross; inevitably you lose major functionality >> like "#ifdef 0/#endif" and the language designers defend it to the >> end. > >I'm glad to see people acknowledging that the C preprocessor is a >powerful tool and not something to be shunned unconditionally. Used >improperly, you can cut off your own leg, but the same is true for a >chainsaw - yet both are still useful tools. > >I'm so sick of hearing over and over again about the evils of >preprocessors that I'm writing an article for Game Programming Gems >3 on "Finding Redeeming Value in C-Style Macros." Since the article >is still in-progress, I was wondering if I could pick the brains of >the people on this list... Currently, I have about eight pretty good >macro tricks, but I'm open to adding more. If you haven't seen it already, you should also check out the boost preprocessor library (see <http://www.boost.org/libs/preprocessor/doc/index.htm>). It's a rather extensive library for preprocessor programming. -- Jesse |