Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-02 08:05:06

"E. Gladyshev" <egladysh_at_[hidden]> writes:

> --- David Abrahams <dave_at_[hidden]> wrote:
>> "E. Gladyshev" <egladysh_at_[hidden]> writes:
>> Is MPL a modern TEMPLATE library, in your opinion?
>> I ask because compilation time is a very serious
>> issue in the design
>> of MPL.
> In my opinion MPL is a great example of a tool for
> creating modern C++ programs/libraries.
> The h/w and compiler designers will have to deal with
> the compilation time issues. It is their job.
> When you are writing music the last thing that you
> should be thinking about is how these guys are going
> to play it :).

Then I suppose you regularly use O(N^3) algorithms without bothering
to look for an O(log N) version?

Sitting through a five-hour symphony, no matter how beautifully
written, still makes me tired.

People press MPL into service for all kinds of compute-intensive tasks
at compile-time. If eventually things get slow enough to make
development impractical, MPL is of no use to them. If they are
building libraries (e.g. Boost.Python) and the libraries are too slow
for their clients to compile, the clients get upset (yes, this is a
real-world scenario). The clients don't often have the ability to
acquire a faster compiler in a reasonable time-frame (none may be

>> IMO it's nutty to think that people won't use every bit of
>> compilation bandwidth they can stand, once they start to do
>> computation at compile time. Why should it be any different from
>> cycles at runtime?
> By people you mean developers. The developer's time is
> a tricky issue. If you have a better library with a
> long compilation time and not so good library with a
> better compilation performance, which one do you
> choose? If you choose the bad library, you can be
> saving on the compilation time but loosing on the
> development time. How do you count it? Do you care
> how much effort/time did it take to build you car? I
> don't.

You would if it meant you were phoning the dealership every day for a
year trying to find out why it hadn't arrived yet.

> Personally I care about creating a beauty, not the compilation time.

A luxury most working programmers can't afford.

>> In many ways, the more modern a C++ library is, the more of a
>> concern compilation times have to be.
> I agree, but the other guys have to deal with it. However you still
> can be saving on the development time. By the development time, I
> mean the average development time of the industry.

Maybe. If the library is slow to compile on popular platforms, it
won't see much adoption either.

Dave Abrahams
Boost Consulting

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