Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Gastón Hillar

Dr. Dobb's Bloggers

Visual Basic 10 Beta 2 Also Supports Task-Based Programming

December 17, 2009

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.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.