|
Boost : |
From: dan marsden (danmarsden_at_[hidden])
Date: 2008-01-16 02:39:54
Larry Evans wrote:
>Page:
>
>http://spirit.sourceforge.net/dl_docs/traversal/html/traversal/quick_start_guide.html
>
>contains a section titled:
>
>Type Unification
>
>however, it appears like what it describes is more like the stl's
>accumulate or mpl's fold. Could you explain the reason for the
>title and why a title using accumulate or fold wouldn't be
>more intuitive to readers?
The terminology is taken from the paper by Ren and Erwig, in the references
section. I've borrowed a lot of the naming conventions and terminology from
this paper. In the original there are 2 traversal types, type preserving
which return a result of the same type as their input argument, and type
unifying, which take all input types to the same (fixed) output type. In my
library, I've currently replaced the type preserving traversals with
inplace traversals, as C++ suits modification in place better than large
amounts of copying.
The 2 numbered points at the start of the Type Unification section attempt
to explain this, but obviously this could be clearer. I'll have a look at
rewording things.
The operation is certainly not a fold, so I think it would be misleading
to associate the example with fold like terminology.
Cheers
Dan
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk