Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-04-11 00:43:14


Joel de Guzman wrote:

>> And that takes all the fun out of it. pp-metaprogramming and indeed
>> template metaprogramming, given the current language, is all about
>> _manipulation_ of the language. If you take that away, it is still
>> very useful, but not as "creative", therefore, not as fun. ;)
>
> It would be nice to experiment on new features such as scopes
> and true iteration. I think it is also a good idea to *push* the
> CPP specifications with the future in mind.

A scoping mechanism is already in being considered (FYI, precisely because it
*limits* the preprocessor).

The "strict" pp-lib nearly achieves true iteration and recursion. For example,
there is an exponential loop structure that is capable of approximately 2^*512
power iterations and only requires about (as usual) three or four macros. It is
reentrant 512 times and both the termination predicate and the state mutation
operation can both be recursive on themselves if desired.

The point being, that we can already do quite a bit with the tools that we have
already. A few things here an there I would really like to see though: 1)
evaluation of constant expressions, 2) standardization of the charizing
operator, 3) the ability to directly manipulate preprocessing tokens themselves.

Keep in mind also that the preprocessor and preprocessor metaprogramming is not
the be-all-and-end-all. It is often *not* the best solution for a given task.

Regards,
Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk