Anders Hejlsberg talking on the new C# and VB features for the version to follow C# 4.0 (timecode 48:10):
[Async methods] allow you to compose asynchronous stuff using normal flow of control and using all of the statements that you know already.
Pretty sweet. The first (longer) portion of the presentation is on the new asynchronous programming features for C# and VB. A hidden gem at the end (starting at timecode 50:40) is the “Compiler as a Service” status report. They’re experimenting with providing compiler front end, back end, and intermediate transformations as a run-time library.
It’s curious that there was no mention of the async transformations (first section) during his discussion of general purpose syntax transformations (second section). It would be interesting to see whether the “Compiler as a Service” libraries provide sufficient support as to be able to extend C# with things like ‘iterator syntax’ or ‘async methods’, without having to wait for a new compiler.
(A nod of course to Lisp’s macros, Scheme’s continuations, and Haskell’s use of monads; for defining new control flow primitives)
I wonder how similar Microsoft’s C# compiler as a service implementation will be to Mono’s: http://tirania.org/blog/archive/2010/Apr-27.html