
On Sat, May 14, 2011 at 9:06 PM, Mostafa <mostafa_working_away@yahoo.com> wrote:
On Sat, 14 May 2011 12:38:50 -0700, Lorenzo Caminiti <lorcaminiti@gmail.com> I just took a quick glance at the documentation to get an understanding of the library, and I have a suggestion/comment:
1) I suggest adding:
#ifdef ENABLE_BOOST_LOCAL_VARIADIC_WITH_DEFAULT #define WITH_DEFAULT , default #endif
#ifdef ENABLE_BOOST_LOCAL_SEQUENCING_WITH_DEFAULT #define WITH_DEFAULT ) default #endif
to the library. I think it makes client code more readable if they define ENABLE_BOOST_LOCAL_VARIADIC_WITH_DEFAULT or its variant rather than just defining WITH_DEFAULT.
Something similar (at least for the variadic syntax) is suggest in one of the docs examples -- see last example here: http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/boost_local... However, Boost macro naming conventions will require this macro to be named BOOST_LOCAL_WITH_DEFAULT if the macro were to be added to Boost.Local. IMO, that name is too long defeating the increased readability benefit. Therefore, I'd leave it up to programmers to #define WITH_DEFAULT if they wish to do so as suggested by the above doc example.
2) In you're email you mentioned that Boost.Local functions can be used with stl algorithms, is this noted in the web documentation?
Yes, it is mentioned in a few places starting at the very beginning of the Introduction section (3rd bullet point from the top): http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/index.html#... Here is a sketch of how Boost.Local implements passing local classes as template parameters (normally not allowed in ISO C++): http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/boost_local... Thanks! --Lorenzo