Is it the beginning of the end for Visual Basic? Microsoft to focus on 'core scenarios'

Hello darkness my old friend

Visual Basic 6.0, the last version before .NET
Visual Basic 6.0, the last version before VB.NET took over

Microsoft program manager Mads Torgersen has posted about the company's programming language strategy, stating that the plan for Visual Basic has shifted from co-evolution with C# to a focus on "core scenarios".

Torgersen outlines the strategy for the three pure .NET languages, C#, VB, and F#. C#, says Torgersen, is used by millions and will keep evolving as a "state-of-the-art programming language". F# is used by "tens of thousands" and will be "the best tooled functional language on the market". VB, though, is mostly used for Windows Forms applications (plus a few ASP.NET Web Forms), and by new developers, many of whom switch to C# when they discover its richer ecosystem.

Microsoft is therefore no longer keeping C# and VB in rough parity. "VB 15 comes with a subset of C# 7.0's features," says Torgersen. Tuples are in, but other features including is-expressions, out-variables and local functions are not.

A separate post by Microsoft's VB team confirms that: "With regard to the cloud and mobile, development beyond Visual Studio on Windows and for non-Windows platforms, and bleeding edge technologies we are leading with C#."

One key factor is that Xamarin, Microsoft's compiler for iOS and Android, supports C# but not VB.

Although Torgersen insists that his team "will do everything necessary to keep [VB] a first-class citizen of the .NET ecosystem", the prospects for the language are not good. More VB developers will switch now that Microsoft has been clear about its plans.

Without the BASIC language, Microsoft might not exist. Microsoft co-founders Bill Gates and Paul Allen implemented BASIC for the MITS Altair in 1974, and Microsoft Basic was the company's first product. MS-DOS, Microsoft's pre-Windows operating system, came with a BASIC interpreter built in.

Microsoft released Visual Basic 1.0 in 1991. At the time it was revolutionary, a drag-and-drop programming environment for Windows that worked. The existence of VB contributed to the success of Windows itself, since not only professionals but also savvy users could build simple business applications quickly.

The success of VB was further consolidated when version 3.0 appeared in 1993, including the Jet database engine (as also used by Microsoft Access) so that desktop database management came as part of the package.

Visual Basic evolved with Windows, acquiring a 32-bit compiler and an option for compiling native executables, until the release of Visual Basic 6.0 in 1998. Although still very popular, by then VB was losing some of its shine. Object orientation enthusiasts disliked the fact that VB only did interface implementation, and not full class inheritance. More seriously, the way the development environment encouraged coders to mix GUI design and business logic was a factor behind many applications becoming hard to maintain. VB also had many idiosyncrasies; interested readers are referred to Bruce McKinney's book Hardcore Visual Basic and especially the last chapter, entitled "Bring Your Hatchet".

In 2001 Microsoft released its .NET Framework development platform complete with a new language, called C#, as well as an updated version of VB, called Visual Basic .NET. "It's a little bit more different than Visual Basic than we would like it to be, but we needed to do that in order to give you the important advances that are in the product," said then-CEO Steve Ballmer. In a nutshell, Microsoft both fixed and broke the language. Fixed, in that it now supported class inheritance and acquired a ton of new capabilities via the Framework libraries, including the ASP.NET web framework. Broke, in that it was incompatible with VB 6.0 as well as requiring a larger, slower runtime. Porting existing applications was hard.

There was also a sense that C# was the primary language of the .NET Framework. Most libraries were written in C#, though they worked fine with VB, and there were richer documentation and samples for C# code. Some VB developers figured that if they were going to switch to the .NET platform, they might as well switch languages as well. Others figured that if .NET was incompatible, they might as well stick with VB 6.0. The seeds of the language's decline begin here.

Is VB that bad? Historically, the language was ahead of C# in certain areas, including background compilation in Visual Studio, dynamic language support, and easier COM interop, though C# caught up in time. Some developers also prefer not to sprinkle their code with curly braces.

The truth, though, is that curly brace languages have won, when you consider the family of C, C++, Java and JavaScript. All these languages (unlike VB) are also case-sensitive.

C# is now far more widely used than VB. The RedMonk Programming Language rankings, for example, place C# at 5, VB at 19, behind R, Perl, Scala and Haskell.

Despite the above, VB will stick around for a while. It is still the macro language of Microsoft Office – and yes, this is essentially the VB 6.0 variant, still included in Office 2016, though it is called Visual Basic for Applications.

Visual Basic is still the macro language for Microsoft Office

Visual Basic is still the macro language for Microsoft Office

Professional developers should also note that the .NET Framework makes it easy to mix VB and C# code within a project, and that the transition between the two is probably easier than that between VB 6.0 (or VBA) and VB.NET. ®


Biting the hand that feeds IT © 1998–2017