Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-02 22:05:21


David Abrahams wrote:
> I don't think that's a good excuse for code duplication. There are
> ways to hide configurability so that it looks like you "can't mess
> with it."

I'm sure there is. I was also looking at it this way, though: Andy
Little's solution has a fixed 7 template dimensions, but no resizing
code overhead. Seems to me like trading compile-time data size for
compilation complexity. But data size is not much of an issue if we are
right in saying that physical quantities might be used much less often
than custom types. For the great majority of custom quantity types, I'd
guesstimate one might use one dimension mostly, sometimes two, very
rarely three; so it might really be inefficient to keep 7 (or more)
template dimensions for these smaller types all over the compiler's
temporary memory buffers; and so, perhaps for these types I would
rather take Matthias Shabel's greater compilation complexity for the
sake of better compile time memory efficiency.

But I've never written a compiler, so maybe I'm totally off-track...

And I also realize, just some subtle simplification in syntax might
probably save programmers more time than a 1000-fold improvement in
compilation speed, so maybe I was totally off track anyhow...

dan


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