[local] What do you think of the new syntax?

Hello all, Before I spend 2+ weeks updating Boost.Local docs... can you please express an opinion about Boost.Local new and simplified syntax? If variadic macros are supported by your compiler: #include <boost/local/function.hpp> #include <iostream> int main() { double sum = 0.0; int factor = 10; void BOOST_LOCAL_FUNCTION_PARAMS(double num, const bind factor, bind& sum) { sum += factor * num; std::clog << "Summed: " << sum << std::endl; } BOOST_LOCAL_FUNCTION_NAME(add) add(100.0); return 0; } On all compilers (with variadic macros or not): #include <boost/local/function.hpp> #include <iostream> int main() { double sum = 0.0; int factor = 10; void BOOST_LOCAL_FUNCTION_PARAMS( (double num) (const bind factor) (bind& sum) ) { sum += factor * num; std::clog << "Summed: " << sum << std::endl; } BOOST_LOCAL_FUNCTION_NAME(add) add(100.0); return 0; } See also http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/index.html#... Thanks a lot. -- Lorenzo

Lorenzo Caminiti wrote:
Hello all,
Before I spend 2+ weeks updating Boost.Local docs... can you please express an opinion about Boost.Local new and simplified syntax?
Thanks Lorenzo for trying to make uniform both interfaces. IMO the interface is enough clear and allows moving from one to the other in a simple way. Good luck, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/local-What-do-you-think-of-the-new-syntax... Sent from the Boost - Dev mailing list archive at Nabble.com.

On 28/02/2011 04:07, Lorenzo Caminiti wrote:
Hello all,
Before I spend 2+ weeks updating Boost.Local docs... can you please express an opinion about Boost.Local new and simplified syntax?
If variadic macros are supported by your compiler:
#include<boost/local/function.hpp> #include<iostream>
int main() { double sum = 0.0; int factor = 10;
void BOOST_LOCAL_FUNCTION_PARAMS(double num, const bind factor, bind& sum) { sum += factor * num; std::clog<< "Summed: "<< sum<< std::endl; } BOOST_LOCAL_FUNCTION_NAME(add)
add(100.0); return 0; }
Nice!

On Mon, Feb 28, 2011 at 5:59 PM, Pierre Morcello <pmorcell-cppfrance@yahoo.fr> wrote:
On 28/02/2011 04:07, Lorenzo Caminiti wrote:
Hello all,
Before I spend 2+ weeks updating Boost.Local docs... can you please express an opinion about Boost.Local new and simplified syntax?
I prefer the simplified syntax over the original one. Well done!
+1 -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (5)
-
Dave Abrahams
-
Lorenzo Caminiti
-
Mathias Gaunard
-
Pierre Morcello
-
Vicente Botet