Boost logo

Boost :

From: Greg Colvin (greg_at_[hidden])
Date: 2000-07-23 19:54:15


From: Howard Hinnant <hinnant_at_[hidden]>
> ...
> I like to:
>
> #define program
> #define HelloWorld int main()
> #define begin {
> #define end }
> #define writeln(x) std::cout << x << '\n'
>
> so I can write:
>
> program HelloWorld
>
> begin
> writeln("Hello World");
> end
>
> ;-)
>
> Syntax sugar can get sooo sticky!

;->

But seriously, the trouble with template metaprogramming
is that the syntax was never designed for the purpose,
so it's just terrible to read and write. So while there
is no good reason to use macros to turn C++ into Pascal
when the C++ is perfectly readable, a set of macros that
let you write readable metaprograms might be quite useful,
if only the C preprocessor wasn't so brain-dead.


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