Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2003-12-21 13:57:39


>"Andy Little" <andy_at_[hidden]> writes:

>> "David Abrahams" <dave_at_[hidden]> wrote in message
>> news:ullp7fa6l.fsf_at_boost-consulting.com...
>>
>>> Do you have an a priori reason to think that using the MPL is going
>>> to make compilation times longer than doing it some other way?
>>
>> Yes. IF the other way involves less metaprogramming of any kind.

I've been using VC 7.0 and gcc 3.2.

I've also been using MPL whenever I found a good fit with my application.
I've totally ignored considerations of compile time.
I've not detected any "long" compile times.

My general philosphy is

a) survey the available methods. boost has a large number of techniques.
b) if there's one that looks like a good fit use it
c) build and test the application
d) if there are any "slow" parts, then and only then go back and
try another method or rewrite your own.
e) if the executable seems "slow" - run a profiler on the release
mode code. ( not a bad idea anyway ) usually most of the wasted
time is in a small area which can then be fixed up.

In my view much of the discussion regarding compile/execution
speed is premature and based on speculation. Unless a totally
inappropriate method/algorithm has been selected, Its really not
possible to know apriori how much of a burden a particular piece of
code is going to be to the whole application. I often get concerns
raised about performance of the serialization library from people
who haven't used it - never from anyone who does.

The main complaint I have with MPL is that as far as I'm concerned
the manual is not complete. I find myself having to search through
the source code to find things that I need because they are not in
the manual. Also it seems that parts are un-intuitve and require
twising my brain to understand, E.G. if_ and apply_if don't seem
to quite substituteable - I suppose the problem is that meta-programming
is just an extra level of abstraction which makes it harder to understand.
This would make an improved manual even more useful.

To use MPL, you will have to sort of stop progress on your main interest
and invest time in it. I understand that that's frustrating - but take it
from one who's been there it will payoff. It will also get you prepared
to deal with jamfiles - if you make it that far - which is nothing short
of shear torture.

Robert Ramey


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