
On Tue, Feb 1, 2011 at 6:04 PM, Gregory Crosswhite <gcross@phys.washington.edu> wrote:
Hey everyone,
The purpose of this e-mail is to rave about Lorenzo's proposed Boost.Local library in the hopes of inspiring people to start the review process for it. :-)
I have been experimenting with using this library in my own code, and it has been a godsend for me. In one of the projects I have been working on I ran
I'm glad my library is helping :)
At first I thought that the interface needed to use it was ugly, but as I have gotten used to it I have changed my mind. Part of why I thought it was
Other people (but not Boosters) have made a similar comment about the "parenthesized syntax". It's (very) strange at first but it's not bad at all after the 1st week of using it.
ugly was because of the way that whitespace was used in the example included in the original e-mail:
BOOST_LOCAL_FUNCTION( (void) (add)( (double)(num) (const bind)((factor)) (bind)((&sum)) ) ) { sum += factor * num; std::clog<< "Summed: "<< sum<< std::endl; } BOOST_LOCAL_FUNCTION_END(add) add(100.0);
I personally use this version when the parameters can fit in a single line and...
To my mind this example looks a lot clearer if you reformat it as follows:
BOOST_LOCAL_FUNCTION( (void) (add)( (double)(num) (const bind)((factor)) (bind)((&sum)) ) ) { sum += factor * num; std::clog<< "Summed: "<< sum<< std::endl; } BOOST_LOCAL_FUNCTION_END(add) add(100.0);
... this other version when the parameters are too long to fit in one line. Programmers can use the white spaces as they wish (as white spaces do not matter in the parenthesized syntax). I am happy to rework all the library examples to comply with the white space formatting that Boosters find most readable by default. Hello all, Sorry for the late reply (and many thanks to Pierre for letting me know that Boost.Local discussions resumed). I will reply to all your comments separately in a few emails that will follow shortly. I hope my replies do not appear too disorganized given that I haven't been able to send them in real-time. (I also have to review the Boost.Phoenix vs. Boost.Local email thread...) Thanks in advance for all you comments on Boost.Local! -- Lorenzo