Visual Basic 10 Beta 2 Also Supports Task-Based Programming
Visual Basic 10, part of Visual Studio 2010 Beta 2, also supports the new task-based programming model. Therefore, you can take advantage of multicore hardware using this programming language. In fact, it offers access to all the new features introduced in .NET Framework 4 Beta 2.In the last years, most of the examples, sessions and blog posts promoting and teaching the new task-based programming model offered by .NET Framework 4 used C#. Thus, a big question appeared among Visual Basic developers. Is Visual Basic going to support the new lightweight concurrency and parallelism model?
The answer is very simple. Visual Basic has access to the same .NET Framework 4 that other managed languages use, like C#. Therefore, it has access to all the new features offered in the framework. Besides, Visual Basic 10, the new version that ships with Visual Studio 2010, still in Beta 2, offers many interesting improvements that make it easier to work with the new classes, types and structures introduced by the Task Parallel Library (TPL). One of the most important is the introduction of the multi-line lambda expression syntax because it allows to simplify the usage of parallel loops and all the methods that require delegates. That was possible in C# 3.0 and now it is also available in Visual Basic 10.
The absence of multi-line lambda expression syntax in the previous Visual Basic version was a big problem because it lambdas are very useful to simplify the parallel code which require the always difficult to understand delegates. The introduction of this feature in Visual Basic 10 is great news for developers working with previous versions and willing to improve the performance of their applications.
A week ago, Microsoft updated the parallel programming samples in their Code Gallery and they included Visual Basic 10 versions of most of the examples. Now, Visual Basic developers will have access to more examples and they will realize that they are also going to be able to use the new task-based programming.
After moving to managed code, Visual Basic lost popularity. However, it is still a popular language and it is very important to make it clear that it will support the new features that will change the way developers code for multicore. If you are a Visual Basic developer and you were disappointed with all the C# examples, you can check the updated "Tour Through the Parallel Programming Samples for .NET 4" and download the new Visual Basic samples using TPL features.
The great disadvantage is that you have to work with Visual Studio 2010 Beta 2 in order to run the examples and, so far, the IDE is still very unstable. Whilst working with these examples, you can experience unexpected crashes. As I always say, it is still in Beta 2.