$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2001-12-17 17:10:27
> This is totally cool. However, I have a philosophical problem with the
> preprocessor library (maybe philosophical is the wrong word): If I have to
> debug code generated by the preprocessor library, or even understand the
> source, I'm going to have a hard time.
This is a real problem. As a kind of an experiment, I used PREPROCESSOR in
lambda for one file which has two dimensional repetition:
some_template_1, some_template_2, etc.
within these templates the repetition is within the argument lists.
The code is much shorter than typing out all the
different versions. And a sincle preprocessor constant can be used to
change how many templates to generate.
And the library is awesome!
But still. The resulting code is _really_ hard to understand. And if you
get a compile time error, I guess most compilers just point you to the macro
invocation, which doesn't help a lot if the macro hides 500 lines of
code. So I didn't went a head and use preprocessor throughout the whole
library, but rather I'm thinkin to move back to the repetitive code in
the test case as well.
Jaakko