Formal Review: Boost.RangeEx
Dear Developers and Users, It's my pleasure to announce that the review of Neil Groves' RangeEx library starts today and lasts until March 3, 2009. What is it? +++++++++++ The library provide two very useful extensions to the range library 1. Range-based algorithms. E.g. boost::sort( rng ); which is a convenient wrapper of instead of std::sort( boost::begin(rng), boost::end(rng) ); But the new interface also allows for more expressive code because (on the fly) composition of algorithms suddenly is possible. 2. Range adaptors. E.g. std::vector<int> vec = ...; boost::copy( vec | boost::adaptors::reversed, std::ostream_iterator<int>( std::cout ) ); where the expression "vec | boost::adaptors::reversed" wraps the iterators of the range on the left in reverse iterators. The library provides a wide range (no pun intended) of Range adaptors, and they are a powerful way to create ranges on the fly and pass them to algorithms. Getting the library +++++++++++++++++++ The library may be downloaded from http://www.cs.aau.dk/~nesotto/boost/range_ex.zip or from the Boost vault under "Algorithms". The docs may be browsed online here http://www.cs.aau.dk/~nesotto/boost/libs/range/ Please note that the documentation is integrated with the current Range ilbrary. Therefore the relevant sections for the review is http://www.cs.aau.dk/~nesotto/boost/libs/range/doc/adaptors.html and http://www.cs.aau.dk/~nesotto/boost/libs/range/doc/algorithms.html The code may be browsed here: http://www.cs.aau.dk/~nesotto/boost/boost/range/ Notice the library is header only (exception: the adaptor tokenized() depends on Boost.Regex). Writing a review ++++++++++++++++ If you feel this is an interesting library, then please submit your review to the developer list (preferably), or to the review manager. Here are some questions you might want to answer in your review: - What is your evaluation of the design? - What is your evaluation of the implementation? - What is your evaluation of the documentation? - What is your evaluation of the potential usefulness of the library? - Did you try to use the library? With what compiler? Did you have any problems? - How much effort did you put into your evaluation? A glance? A quick - reading? In-depth study? - Are you knowledgeable about the problem domain? And finally, every review should answer this question: - Do you think the library should be accepted as a Boost library? Be sure to say this explicitly so that your other comments don't obscure your overall opinion. Special considerations ++++++++++++++++++++++ Various RangeEx like libraries have been implemented in the past. You might want to compare with those libraries when you form your oppinion: 1. John Torjo's range lib http://rangelib.synesis.com.au/libs/boost-rangelib-20040913.zip http://torjo.com/rangelib/index.html 2. Adobe's ASL libraries include range-based algorithms: http://stlab.adobe.com/group__algorithm.html I'm looking forward to your review. best regards Thorsten, Review Manager
On Fri, Feb 20, 2009 at 12:28 PM, Thorsten Ottosen
- What is your evaluation of the design?
The design seems sound. I really, really want to keep the operator syntax, using the pipe symbol, but this should not be the only or primary way to access the functionality, since syntax is not general enough for the general case. The 'ed naming is not good, and for consistency across Boost the _view naming should be used. However, in my mind map each of the adaptors is a verb rather than a noun, so the expression should read as rng | sort | unique rather than rng | sort_view | unique_view Whereas when the function invocation syntax is used the _view naming seems to express the intent more clearly. ie unique_view( sort_view( rng ) )
- What is your evaluation of the implementation?
I haven't looked at the implementation in detail, but it seems well behaved, appropriate detail hidden etc.
- What is your evaluation of the documentation?
Adequate but sparse. The nature of the lazy evaluation could be made more prominent, and the mapping of adaptors to existing Boost or STL algorithms specified, and maybe tabulated.
- What is your evaluation of the potential usefulness of the library?
Hugely useful, and becoming increasingly necessary. Ranges rather than iterators are becoming the focus of thought, and this library is beginning to look like a glaring omission from Boost.
- Did you try to use the library? With what compiler? Did you have any problems?
I've been using various snapshots from the vault for months, under GCC 3.4.4 and MSVC 8. I haven't noticed any probs, but my use does not constitute comprehensive coverage.
- How much effort did you put into your evaluation? A glance? A quick - reading? In-depth study?
More than a quick glance, close to in depth study, but patchy.
- Are you knowledgeable about the problem domain?
No more than average.
- Do you think the library should be accepted as a Boost library?
YES YES YES YES YES!
1. John Torjo's range lib
http://rangelib.synesis.com.au/libs/boost-rangelib-20040913.zip http://torjo.com/rangelib/index.html
I looked at this too, although I had not been aware of its existence until
this review invitation mentioned it. I'd say Neil's is a better cleaner implementation. Why did John's lib not get into Boost? Thanks, Rob.
participants (2)
-
Robert Jones
-
Thorsten Ottosen