On Sun, May 23, 2010 at 08:44:42PM +0100, Chris Cannam wrote:
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.
well... basically c++0x is adding some of the cool features of python to
c++ now. i recognise most stuff because its all the python neatness i
always wanted to have in c++.
std::map<std::string,int> m = { { "a", 1 }, { "b", 2 } };
--
torben Hohn