On Sun, May 23, 2010 at 9:41 AM, torbenh <torbenh(a)gmx.de> wrote:
but i find the equivalen c++ easier to read.
assuming we have a proper modern c++ osc lib:
boost::unique_future<OscMsg>
osc_recv (OscPeer peer, std::string path)
{
boost::shared_ptr< boost::promise<OscMsg> > spromise( new
boost::promise<OscMsg> )
peer.add_handler( path, [=]( OscMsg msg )
{
[...]
Is this C++0xthingy?
I have to say this combination of Boost plus Weird Stuff From The
Future is no more readable to me (as a long-time C++ programmer) than
the Clojure example. It looks neat, but I'm pretty sure it's
accessible to you only because it's what you've spent the time with
recently.
I worry about that all the time with my own code -- the more care I
take to use the language well, the less likely anyone else is to be
able to work with it.
Chris