Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-25 10:15:55

I've been thinking of a hybrid scheme for Boost.Python, which currently
uses Python scripts to generate readable, debuggable code. If I arrange
things right, it should be possible to use a single specification for
generated code which generates some number of fully-expanded and
formatted instances, then dumps a small PP metaprogram for higher
numbers of arguments. That way I'd be able to read tests, and still
provide people with a way to expand the maximum arity handled (and break
the ODR ;-)) at compile-time.


----- Original Message -----
From: "joel de guzman" <djowel_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, March 25, 2002 5:57 AM
Subject: Re: [boost] Review: lambda library

> ----- Original Message -----
> From: "Vesa Karvonen" :
> > From: "joel de guzman"
> > >With Phoenix, implementation wise, not a single macro was used.
> >
> > How did you implement the library? Are you using an external
generator, or
> > did you just type everything using a text editor?
> Hi Vesa,
> You won't believe me or say I'm nuts if I say that it's all hand coded
:-) At the
> prototype stage, I started with 5. When everything was working fine,
it was
> bumped to 15 with #ifs in increments of 3.
> I thought about using a perl script or some generator. This would have
> the practical choice. But I was lazy. Considering that code layout is
of prime
> importance to me (I adhere to layout religiously), it would have taken
me longer
> to take into account 80 char column widths, indentations to make it
look nice
> and so on. Perhaps next time, I'll use a generator and a C++ code
> Another way is to use Boost PP, preprocess the code and run it through
> C++ code beautifier.
> Vesa, I know that Boost's PP is such an excelent piece of engineering.
> I guess I am just at the other extreme and I really do have a total
dislike for
> macros. I honestly thought at first that PP is an excelent idea, then
I was
> disapointed when it came to debugging the compiler generated error
> I feel more comfortable reading straight C++ code. I'll definitely
have more
> uses for it, albeit indirectly like the way I described above.
> Regards,
> --Joel
> PS> Now, is there a modern C++ savvy code beautifier ot there?
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at