Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2002-08-13 00:08:22


>From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>

> "Terje Slettebø" <tslettebo_at_[hidden]> wrote in message
> news:153001c24071$34b897b0$60fb5dd5_at_pc...
> >Take one of the simplest algorithms, factorial.<

I missed the first part, here, hence this addendum. Since you didn't use
">", it was kind of hard to figure out what was quotes, and what was not.

> This example has two problems: (1) it's not a "real-world" example because
I
> don't find myself running around and computing factorials of all possible
> types at compile time;

I didn't say it was a real-world example. I said it was an example.
Specifically, an example that showed you could write generic functions,
using MPL.

> (2) It doesn't justify MPL's design that imitates STL's design;

Why not? STL has generic functions, too. Your point being?

There's more to STL than sequences.

> (3) it really works more against your viewpoint :o).

Again, in what way?

You claim that you find the MPL code harder to understand, than using C++,
specialisations, etc., and essentially without any library. I claim that
this depends on what you're used to. Someone using C++, but unfamiliar with
the standard library and STL, may claim they find it easier to write things
themselves, too, rather than using the library. However, I don't think you'd
agree with them.

Regards,

Terje


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