Biz & IT —

The future of Microsoft’s languages: C# to be powerful, Visual Basic friendly

A change that should have been made fifteen years ago.

The future of Microsoft’s languages: C# to be powerful, Visual Basic friendly

Since their introduction in 2002, Microsoft's pair of .NET programming languages, C# and Visual Basic.NET, have been close siblings. Although they look very different—one uses C-style braces, brackets, and lots of symbols, whereas the other looks a great deal more like English—their features have, for the most part, been very similar. This strategy was formalized in 2010, with Microsoft planning coevolution, to keep them if not identical then at least very similar in capability.

But the two languages have rather different audiences, and Microsoft has decided to change its development approach. The company has made two key findings. First, drawing on the annual Stack Overflow developer survey, it's clear that C# is popular among developers, whereas Visual Basic is not. This may not be indicative of a particular dislike for Visual Basic per se—there's likely to be a good proportion within that group who'd simply like to consolidate on a single language at their workplace—but is clearly a concern for the language's development.

Second, however, Microsoft has seen that Visual Basic has twice the share of new developers in Visual Studio as it does of all developers. This could indicate that Visual Basic is seen or promoted as an ideal beginners' language; it might also mean that programmers graduating from Visual Basic for Applications (VBA) macros in programs such as Word, Access, and Excel are picking the option that is superficially most comfortable for them. Visual Basic developers are generally creating business applications using WinForms, or occasionally ASP.NET Web Forms; the use of WinForms in particular again suggests that developers are seeking something similar to Office macros.

Accordingly, the development of the two languages is set to diverge. C# is going to continue to pick up more complex features. C# 7.0, for example, is adding integrated support for tuples and pattern matching syntax, the latest language features showing significant influence from functional programming languages like ML and Haskell. Visual Basic 15 is adding some of these, such as tuples, but it isn't going to match every new feature in C# 7.0. Going forward, it will be maintaining readability and keeping the number of different concepts manageable.

The third .NET language, F#, has always been developed along a more independent path, reflecting its very different heritage. For F#, the primary goal going forward is to make the language easier to use, with better error messages, better compiler error messages and support within Visual Studio, and all round making F# fit into the .NET landscape as well as C# and Visual Basic already do.

The company has expressed no plans for the development of C++/CLI, its version of C++ for .NET.

The change in plans for Visual Basic development makes a lot of sense, but many Windows developers, and in particular, one-time Visual Basic developers, may feel that it's about 15 years too late. In spite of its name, the current Visual Basic is not the same language as the ancient Visual Basic 6, nor the Visual Basic for Applications used for macroing. The transition to .NET in 2002, with what was called, at the time, Visual Basic.NET, left developers familiar with those languages high and dry; although the new language was called Visual Basic, and looked a bit like Visual Basic, it was really just C# in disguise. There was no good migration path from old to new, and much of the simplicity of those older languages was forfeit. The changes arguably made Visual Basic.NET a technically better language—it gained proper support for object orientation, for example—but this was little comfort to those left behind.

This gap continues to be a feature of Windows today. Microsoft has introduced new JavaScript-based macroing capabilities to some Office programs, but nothing with the same mix of capabilities and ease of use that Visual Basic for Applications has. Database development tool Access remains without peer or alternative. Office macros and Access are often looked down on by "real" programmers, but nonetheless empowered a generation of office workers to build complex automated systems without ever having to get IT or a professional developer involved. These non-professional business apps are for many companies mission-critical and essential for their day-to-day operation.

Microsoft's subsequent attempt to build a development tool for non-developers, Visual Studio LightSwitch, didn't really hit the mark, and last year the company announced that it was ending development.

Accordingly, we find ourselves in a world where computers are not empowering devices for the Everyman and where application development is a task reserved exclusively for professional developers. If Microsoft had only had its insight about Visual Basic many years sooner, the PC may have remained a tool for everyone rather than the select few.

Channel Ars Technica