This article is more than 1 year old

Microsoft: Hey, don’t forget Visual Basic! Open source and new features coming

Keeping the faith ... but it is past time to move on

Microsoft has posted details of what is coming in the next version of Visual Basic (VB).

In the '90s, VB was pretty much Microsoft’s only alternative to C/C++ for Windows development, attracting a large user base from hobbyists to professional developers. VB lost ground following the appearance of the .NET Framework in 2002. Many professionals switched to C#, the closest thing to a native language for .NET, and some who wanted to stick with VB found the changes from VB 6.0 to VB .NET difficult to accept, especially as it was incompatible with existing projects.

Visual Basic still has a following though. Case insensitivity and a more English-like syntax seem to make it less intimidating than curly-brace languages like C#. VB is widely used in schools and retains some business usage. Microsoft has kept VB mostly on a par with C# in terms of language features, and both compile to similar IL (Intermediate Language) binaries so performance is similar.

Visual Basic 14

Microsoft Visual Basic 2015

Now program manager Lucian Wischik has posted details of what is coming in Visual Basic 14, part of the Visual Studio 2015 release now in preview. VB is part of the open-source wave at Microsoft, so as Wischik observes, the VB compiler will be open source as part of the project codenamed Roslyn. The current version is VB 12, so Microsoft is skipping unlucky version 13, to keep in synch with Visual Studio itself.

Then again, it’s confusing enough that Visual Studio “14” is also Visual Studio 2015. Never mind.

What’s new in VB 14? Perhaps the biggest annoyance fixed is that VB will now allow multi-line string literals, avoiding the need for unnecessary concatenations. There is also a new ?. operator which returns a nullable type rather than an exception if it references a property of a null object:

Customer?.Name

VB 14 is also getting string interpolation. Instead of using a positional placeholder, you can embed expressions in strings prefixed with the $ character:

Dim s = $”Hello {Customer.Name}”

A new NameOf operator returns the identifier name passed into a function.

You can see the full current list of new features in VB 14 here.

Microsoft’s commitment to Visual Basic is understandable. Microsoft BASIC (for the MITS Altair) was the company’s first product. Today though there are reasons to avoid VB. In the .NET world C# is the premier language, and VB has no real advantage.

Case insensitivity is more a liability than an asset. Some third parties, such as Xamarin and RemObjects, offer cross-platform compilers for C# targeting the Mac and mobile platforms, but not for Visual Basic. In education, any advantage in VB’s simplicity is outweighed by a more difficult transition to other languages such as JavaScript or Java.

There are developers who love VB though, and who see no need to move away. The good news for them is that Microsoft is keeping the faith.®

More about

TIP US OFF

Send us news


Other stories you might like