Async involves some new concepts. They're not difficult; just unfamiliar. Over the past year Lucian Wischik has been watching how people use async/await in C# and VB. This series distils out the three top async patterns and anti-patterns. Tips: Async void is for top-level event-handlers only, and…
Async Tip #2: It's crucial to distinguish CPU-bound work (should be done on threadpool) from IO-bound work (which needn't). You can download slides for this talk from Lucian's blog. I remember reading an old Android dev blog post. It said: "1. A good practice in creating responsive…
Async Tip #1: Async void is for top-level event-handlers only, and event-like things. Don't use it elsewhere in your code. Slides are available on Lucian's blog. Async void is a "fire-and-forget" mechanism: the caller is unable to know when an async void has finished, and the…
VB and C# together share about 50% of the “garbage-collected languages” market. I’ll talk about how we design these languages. Where do we get ideas? How do we incorporate new paradigms without breaking the existing languages? Where will we go in the future,
and how will we get there? I’ll…
What is Roslyn? Traditionally, compilers are black boxes – source code goes in one end and object files or assemblies come out the other end. The Roslyn project changes that model by opening up the Visual Basic and C# compilers as APIs. These APIs allow tools and end-users to share in the wealth of…
For most of their lifetimes, C# and VB.NET have evolved at their own pace and in their own ways (C# added iterators, VB.NET didn't. VB.NET added XML Literals, C# didn't. etc, etc...). Today, Luca Bolognese and team have embarked on a new approach to how
.NET's premiere languages will evolve going…
In this interview Dmitry Robsman, the Product Unit Manager for ASP.NET, shows us how he implemented ASP.NET MVC views using Visual Basic's XML Literals instead of .aspx pages. He shows us how this makes coding the views much cleaner using standard OOP
principals. He also makes some very…
Meet some of the key folks behind the Async CTP, which contains a preview version of C# and VB.NET that contain two new modifiers, async and await (and iterators for VB.NET!), that will make it much easier to compose asynchronous code for .NET. Great work, C#, VB and Parallel Platform teams (and…
Lucian Wischik is an engineer who spends a great deal of his time making Async magic happen in the C# and VB compilers. With the recent release of Visual Studio Async CTP SP1 Refresh, come several low-level improvements in how asynchrony is orchestrated by the compiler infrastructure.…
Async Tip #3: You can wrap events up in Task-returning APIs and await them. This can dramatically simplify code. Slides and source code are available on Lucian's blog. This video introduces a new pattern for dealing with events: you can await them! Now why would you want to do that? Well,…