Boost logo

Boost :

From: Joel (joel_at_[hidden])
Date: 2004-12-13 20:20:09


Larry Evans wrote:
> Thanks for your responses, David.

[snips]

Well, right now, I only have time to reply to one issue,
this issue:

flat vs. linear tuples:

Whenever I have some more free time (too much to chew), I
am writing some docs for fusion. A part of it will be
dedicated to a rationale which shall attempt to explain why
a flat structure is generally optimal. I did have some tests.
The tests were driven 2 years ago when Volodya (I'm CCing
him) complained that the mere construction of a cons list
based tuples (the original) generated > 10 times code than
a flat struct. Ditto to accessing the members.

Anyway... that said... I believe the right way to go is to do
as STL or MPL did: allow the user to choose the right structure
for the job. Quite recently, I've been needing a cons based
tuple structure which has certain characteristics that I require.
I couldn't reuse fusion's flat structures for that.

I am of the opinion now that fusion's tuple should really be
called fusion::vector. In addition, other types of fusion sequences
should be created. Each with its own properties/tradeoffs. I know
this is deviating from the TR1 tuples too much, but I think it's
the right way to go. A TR1 tuples interface can simply be added
on top of the library, not as a basis of it.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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