News for hackers. Stuff that matters.
Re:Microsoft open sources C++ REST SDK "Casablanca" by twoodfin on Wednesday February 27, 2013 @12:02AM (#5290746)
That looks like Microsoft's new "async everywhere" approach to API design. It's probably a pretty good idea in concept, but I hope they don't expect C++ developers to actually write those awful nested lambda .then() blocks for what are conceptually sequential actions.
Re:Microsoft open sources C++ REST SDK "Casablanca" by marshray on Wednesday February 27, 2013 @12:06AM (#5290766)
I expect you can define named functions for your "conceptually sequential actions" if you prefer.
Re:Microsoft open sources C++ REST SDK "Casablanca" by twoodfin on Wednesday February 27, 2013 @12:23AM (#5290828)
Sure, but is that much better? It reminds me of having to create named struct classes to simulate closures prior to C++11 lambdas. The language syntax just doesn't support that style of programming.
Re:Microsoft open sources C++ REST SDK "Casablanca" by marshray on Wednesday February 27, 2013 @02:14AM (#5291099)
So how many languages actually do support this style directly?

The C# async keyword looks pretty clean, just give C++ a decade or so to catch up.

Re:Microsoft open sources C++ REST SDK "Casablanca" by MichaelGG on Wednesday February 27, 2013 @01:14AM (#5290967)
Is there a better approach available in C++? In other languages you'd use monads or other special compiler forms that can rewrite sequential looking code into the horrible multi-nested callback/error handling code it needs to be.
Re:Microsoft open sources C++ REST SDK "Casablanca" by ajasmin on Wednesday February 27, 2013 @01:45AM (#5291042)