On Sun, May 23, 2010 at 08:44:42PM +0100, Chris Cannam wrote:
> On Sun, May 23, 2010 at 9:41 AM, torbenh <torbenh@email-addr-hidden> 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 _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@email-addr-hidden http://lists.linuxaudio.org/listinfo/linux-audio-devReceived on Mon May 24 16:15:03 2010
This archive was generated by hypermail 2.1.8 : Mon May 24 2010 - 16:15:03 EEST