Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2004-03-02 12:07:52


> > Actually the point of my remark is that would we be able to
> write meta
> > programs in imperative style instead of FP style
> compilation would be
> > much faster.
>
> The slowness of metaprogram compilation has almost *nothing*
> to do with the FP style of metaprogramming, and almost
> everything to do with the accidental nature of the
> metaprogram evaluation engine (using template instantiation).

And why do we have so many template to instantiate? Exactly my point:
because we couldn't change type definition we could only create new one. How
many helper templates gets instantiated to remove const types from the
type-list? Should be none. So you are right: it has everything to do with
nature of metaprogram evaluation engine, which is FP based one.

> In fact, you *can* write metaprograms in an imperative
> style, given an appropriate framework designed to interpret
> them correctly. It'll be much slower than what we use today.

You have any grounds for this statement?

> > And Spirit framework would benefit from it the most.
>
> I doubt that. Parsing in particular has little to gain from
> the use of mutable data.

I meant from compilation time standpoint.

Gennadiy.


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