Microsoft Puts C#, Visual Basic on Different Paths

Microsoft Build 2016 - The Future of C#EDITOR’S NOTE: This blog received an update to better reflect what some of our tech people said about a reason some people dread using Visual Basic. Thanks to reader Raymond for pointing out how unclear the previous writing was.

Did Build 2016 signal the death knell for Visual Basic? Probably not, but it did mark the divergence of C# and Visual Basic.

“We are realizing that this sort of automatic approach of doing everything to Visual Basic that we’re doing to C#, just sort of automatically, that doesn’t seem like the right approach,” said Mads Torgersen, program manager for C# at Microsoft, during Build 2016.

Visual Basic, C# Communities Want Different Things

Torgersen said discussions with the Visual Basic community made it clear these developers don’t want the same things those in the C# community want.

  • Visual Basic developers value stability, quality, support, awesome tooling.
  • C# developers like those things too, but are more inclined to want new features to make their language modern.

“So, you’re going to see us starting to differentiate those two languages more and do things differently with them as we go.” Torgersen said.

Developers Dread Using Visual Basic

Dustin Campbell joined Torgersen in a discussion on “The Future of C#” at Build 2016. He said a Stack Overflow survey revealed that most developers using Visual Basic would like to stop, with 79 percent of those surveyed calling it the language they dread the most. They loved REST, Swift, F#, and C# made it on the list with 62 percent support.

Campbell and Torgersen explained that developers go to Stack Overflow looking for the newest coding methodologies for the languages they personally enjoy. They suggested that developers are unlikely to be on Stack Overflow to learn about Visual Basic and this could be skewing the results of the survey.

In comparison with C++, C# or Java, our own tech people say Visual Basic earns the most dreaded label in part because it’s so different syntactically. It looks simpler at first, straight forward function names, statements implicitly end with line breaks or end statements, but for some this is in fact making it more taxing to read than other languages. It’s often considered to be too verbose.

Visual Basic’s roots go back to the BASIC language developed at Dartmouth in the 1960’s.

While C# is based on the C programming language developed at Bell Labs in the 1970’s.

You can view side by side comparisons of C# and VB.NET syntax in this Wikipedia article. Just scroll down to the Syntax Comparisons section.

Is This the End of Visual Basic?

As Visual Basic and C# part ways in terms of functionality, will that mean the end of Visual Basic? Probably not immediately, but support could end in coming years if C# feature development outpaces VB.

Microsoft Changes its Tune

Microsoft changed its tune with C# and VB, much like they’re changing their tune on .NET. In the past, .NET ran on Windows and Mono but now with .NET Core it can run everywhere. Some of the goals of .NET Core explained at Build 2016 include:

.NET as system component → Deploy .NET with the app

Run on VM (CLR) → Compile to native

Black box compilers → Open compiler APIs

Edit in Visual Studio → Use your favorite editor

Proprietary → Open source

C# 7 Marks Start of Quicker Releases

Expect feature releases to come more quickly with the advent of C# 7, rather than a long wait for a full feature set. But what new features does C# 7 include?

  • Local functions – for writing helper functions inside other functions. Torgersen said this structures your code sort of like JavaScript
  • Tuples – for temporarily grouping a set of typed values
  • Patterns – test a value to see if it matches a pattern. If so, extract information from it into fresh variables that can be used in scope of where patterns match
  • Binary literals – to show bit patterns
  • Digit separators also can be used

A few features that might not make it into the release of C# 7 are the use of object initializers on immutable types and a records capability.

Izenda BI Platforms can Help Your Business

Looking for an agile BI platform for your business? Click here to see what Izenda has to offer.

Request a live demo

Follow Izenda on social media for the latest on technology and business intelligence: LinkedInOUTLOOKFacebookOUTLOOKTwitterOUTLOOK