Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-20 16:58:16


----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>

> Simplicity is a very important in designing a library.

Yes!

> I've been looking over mtl for only ten minutes. I reckon this might sound
> terribly snooty, but if I had trouble groking it I suspect other people
> would have trouble, too. And I did have trouble; it is quite a feat to
> implement iteration semantics over the template engine, but because of the
> way that template engine works, I find the mechanics of doing and using
that
> overly complex. Even simplest algos such as 'length' or 'empty' look quite
> arcane to someone who hasn't already absorbed a lot of the architecture.
By
> comparison, the corresponding recursive algos are much terser and easier
to
> understand.

Give it a little time, Andrei. Not everything in MPL is perfect in its
design, and there are some things I'm /still/ trying to convince Aleksey to
make simpler. Still, his work does some amazing things on even the
less-capable compilers, and a great deal of deep thinking has gone into it.
I suggest you at least get to the point where you understand the major
concepts and idioms before you dismiss it.

On the subject of recursive algorithms, Aleksey recently rewrote most of the
MPL to be centered around what you might think of as the std::accumulate
algorithm, which has a simple recursive form. After much research, we found
that most algorithms could be implemented simply and cleanly on top of it (I
think Vesa Karvonen was making a very strong argument for this long before I
realized it to be true). There may be more chances to exploit this.

-Dave


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