The Rise and Fall of Visual Basic

After 28 years, are we are finally seeing the beginning of the end for one of the world’s most popular languages?

I have a confession to make. Before I became a respectable developer working with modern curly-bracket languages like C# and Java (and that hot mess of a platform we call JavaScript), I was a dedicated fan of the wildly popular misfit Visual Basic.

My infatuation started honestly. As a preteen I learned to program with the BASIC language. But not just any BASIC. I started off in Microsoft’s groundbreaking QuickBASIC environment on the ancient DOS operating system. I still remember writing code in white text on its cheery blue background.

For programming in 1988, QuickBASIC was magical. You could write code without clunky line numbers, catch syntax errors as you type, and launch your program straight from the development environment, no command-line nonsense required. And when you were finished, you could share your program with your friends using one of these bad boys:

These days, QuickBASIC is just another curiosity of the distant past. Or is it? An innovative project called QB64 has created a modern QuickBASIC replica. It runs on Windows, MacOS, and Linux, with no emulator required. When you run a program in QB64, it performs a clever sleight of hand — first it translates your BASIC code into C++, and then it compiles it.

Classic VB and the visual era

QuickBASIC was an impressive feat for the ancient days of text-based computer systems. But the game changed when Microsoft released Windows, and catapulted PC users into a graphical world of buttons and clicks. At the same time that Microsoft released Windows 3.0 — the first version that was truly successful—they also launched Visual Basic 1.0.

Here was something entirely new. You could create buttons for your programs by drawing them on the surface of a window, like it was some kind of art canvas. To make a button do something, all you had to do was double-click it in the design environment and write some code. And you didn’t use cryptic C++ code, with piles of classes, complex memory management, and obscure calls into the Windows API. Instead, you wrote friendly-looking VB code, like a civilized person.

All the graphical pizzazz was impressive, but the real secret to VB’s success was its practicality. There was simply no other tool that a developer could use to sketch out a complete user interface and get coding as quickly as VB. And though historians love to talk about the visual part of Visual Basic, its signature ability had nothing to do with graphical widgets. Instead, VB became famous for a legendary feature called edit-and-continue, which allowed developers to run their programs, find problems, fix them, and then keep going with the new code. This was a sharp difference from almost every other programming environment known to humanity, which force developers to recompile their work and start over after every change.

The original Visual Basic thrived for roughly a decade. What started as a friendly environment for beginners grew into a tool that was capable enough for serious programmers. By the release of VB 6 — the last version of classic Visual Basic — it was estimated that there were ten times more coders writing in VB than in the unforgiving C++ language. And they weren’t just mocking up toy applications. Visual Basic wormed its way into company offices and even onto the web through ASP (Active Server Pages), another monstrously popular technology. Now you could create web pages that talked to VB components, called databases, and wrote HTML on the fly.

All of this happened with virtually no structure, unless you chose to create one yourself. This was the unwritten theme of Visual Basic — it gave you the freedom now that you’d regret later.

The problem with classic VB

Classic VB had a bad reputation in many circles. Object-oriented fanatics often complained that VB lacked support for inheritance. (It was an odd criticism, considering that inheritance is often a great way for less skilled developers to shoot themselves in the foot — exactly the sort of feature VB didn’t need.) In fact, classic VB was no object-oriented slouch. By the end of its life, it supported interfaces, polymorphism, and class libraries, all of which it borrowed from COM, a core piece of component technology that’s hardwired into every version of Windows.

The real problem with classic VB was that it was too successful. It was so effective in lowering the barriers for new programmers that literally anyone could use it. Careless newbies, bored company workers, and summer students trampled in, solving challenges that would have been much more difficult on any other platform, and spraying spaghetti code everywhere.

In other words, because VB was easy enough to use even if you weren’t a trained coder, it was used by plenty of people who weren’t trained coders. And VB did nothing to encourage them to correct their bad habits.

VB.Fred and the .NET solution

Fast forward to 2002, and Microsoft was doing what Microsoft does best — disrupting its own developer ecosystem by introducing a completely new way of doing things.

This time, the project was a massive rearchitecting of COM, the component technology that underpinned Windows (and, indirectly, classic VB). It was a bet-the-company moment for a software megalith that had already made several such gambles.

Microsoft called this reboot .NET for a number of dubious reasons, including the fact that Internet technologies were still newish and still exciting, and because .NET included a web services feature that Microsoft was dead-set on promoting. It was heavily influenced by Java, and packed full of tools for communicating with databases, building web sites, writing multithreaded programs, making connections over sockets — pretty much every use case a business developer could imagine.

The only problem was that to get all these new features, Microsoft had to throw away almost all of classic VB.

The new version, called VB.NET, looked kind of the same, if you squinted hard. But it had plenty of breaking changes both big and small. On the big side: Old VB programs would be trapped in the old programming world, and a stunningly poor migration wizard did little to change that. On the small side: Classic VB programmers had to change the way they counted array elements. No longer could they start at 1, like ordinary people. Now they had to start at 0, like official programmers.

Also on the big side: There was no more edit-and-continue feature.

Developers are known complainers, and VB developers are a particularly complainy bunch. It wasn’t long before a group of influential VB developers had christened Microsoft’s new programming environment as VB.Fred to emphasize that, whatever it was, this new language wasn’t Visual Basic.

What doomed Visual Basic

You might assume that the .NET changes cracked the foundation of VB and set its inevitable decline in motion. But that’s not what happened. In fact, even though VB.NET plunged off in a new direction, and made breaking changes that orphaned perfectly good classic VB code, it became massively popular. That’s because VB.NET gave something that classic VB developers never had before — respect.

In the .NET world, VB and C# were on equal footing. Every line of VB code could be translated to an equivalent line of C# code, and vice versa. Both languages had the same capabilities, used the same components, and compiled to exactly the same form (something called intermediate language). VB was finally free of the ugly duck syndrome.

But there was a problem with being just another respectable programming language. The enthusiasm that had made VB the language of choice for so many people was gone. Not because VB had changed, but because C# had.

Just as VB acquired the same power as C#, C# picked up the same conveniences as Visual Basic. For example, .NET’s type safety and memory management features meant that C# developers never needed to worry about memory leaks, just like VB developers.

In other words, C# now had the guardrails to protect hobbyists, students, and new programmers without surrendering its power. All of a sudden, VB was no longer something special. It was just another tool in a capable programmer’s toolkit.

The state of Visual Basic today

Today, Visual Basic is in a strange position. It has roughly 0% of the mindshare among professional developers — it doesn’t even chart in professional developer surveys or show up in GitHub repositories. However, it’s still out there in the wild, holding Office macros together, powering old Access databases and ancient ASP web pages, and attracting .NET newcomers. The TIOBE index, which attempts to gauge language popularity by looking at search results, still ranks VB in the top five most talked-about languages.

But it seems that the momentum has shifted for the last time. In 2017, Microsoft announced that it would begin adding new language features to C# that might never appear in Visual Basic. The change doesn’t return VB to ugly duckling status, but it does take away some of its .NET status.

Truthfully, the trend to sideline VB has been there for years. Serious developers know that key parts of .NET are written in C#. They know that C# is the language of choice for presentations, books, courses, and developer workshops. If you want to speak VB, it won’t harm the applications you build, but it might handicap your ability to talk to other developers.

One place where Visual Basic should have had a natural fit is the educational market. But even there it remains a black sheep. Modern languages like C# and Python are now easy and safe enough for beginners to pick up as their first language. If you need something simpler for young children, the market is crowded with graphical programming tools like Scratch. And curly-bracket languages like C#, C, JavaScript, and Java also have another appeal. Because they share their syntax, a person who learns one can feel quickly at home with another.

With web development, Microsoft is staring into the void of a lost opportunity. Who wouldn’t be tempted by a version of VB that was as easy to use as VB 6, but could be compiled to JavaScript, and paired with an HTML form designer? Yes, it wouldn’t be a suitable tool for building the next Google Maps, but it could have resurrected Visual Basic’s appeal, letting business developers, students, and hobbyists create simple online apps without the clunkiness of JavaScript. Instead, Microsoft created a VB-powered product called LightSwitch that disappeared with the death of the Silverlight browser plug-in. If Microsoft builds another coding-for-the-masses product, it’s more likely to be a low-code template-driven tool like PowerApps.

Visual Basic has been threatened before. But this time feels different. It seems like the sun is finally setting on one of the world’s most popular programming languages. Even if it’s true, Visual Basic won’t disappear for decades. Instead, it will become another legacy product, an overlooked tool without a passion or a future. Whether we’ve lost something special — or finally put an old dog out of its misery — is for you to decide.