The rise and fall of Visual Basic

Original author: Matthew MacDonald
  • Transfer
I need to make a confession. Before I became a respectable developer working with such modern languages ​​as C # and Java (and the seething chaos that we know as JavaScript), I was an enthusiastic fan of the incredibly popular and clumsy Visual Basic .

My love was sincere. As a child, I learned to program in BASIC. But not just BASIC. I started with an amazing Microsoft environment called QuickBASIC on an ancient DOS operating system. I still remember typing white text on her peppy blue background.

For programming in 1988, QuickBASIC was a magical thing. It was possible to write code without cumbersome line numbers, catch syntax errors during typing, and run programs directly from the development environment without the need to bother with the command line. Having finished the program, you could share it with your friends with the help of these guys:

Nowadays, QuickBASIC is just another gimmick from the distant past. Although is it so? An innovative project called QB64 created the state-of-the-art QuickBASIC replica. It runs on Windows, MacOS, and Linux, and does not require an emulator. When the program starts in QB64, the environment performs a tricky trick - first it translates the BASIC code into C ++, and then compiles it.

Classic VB and the Visual Age

QuickBASIC was an impressive medium for the distant days of text-based computer systems. But that all changed when Microsoft released Windows and plunged PC users into the graphic world of buttons and clicks. Simultaneously with the release of Microsoft Windows 3.0 (the first version that achieved true success), Visual Basic 1.0 was released.

It was something completely new. The user could create buttons for programs, drawing them on the surface of the window, as on the artist’s canvas. To force the button to perform some action, it was enough to double-click on it in the development environment and write the code. And the code was not written in cryptic C ++ with heaps of classes, complicated memory management and obscure Windows API calls. You, as a civilized person, wrote code on a friendly looking VB.

All of these graphic gadgets were impressive, but the real secret to VB's success was its practicality. There was simply no other tool in which a developer could sketch out a complete interface and start coding as fast as in VB. And although historians love to speculate about the visual part of Visual Basic, his inimitable skill had nothing to do with graphic widgets. VB became famous thanks to the legendary edit-and-continue function, which allowed developers to run programs, find errors, fix them and continue to work with new code. This was very different from almost all other programming environments known to mankind, which forced developers to compile the work anew and start again after each change.

The original Visual Basic flourished for about a dozen years. Having emerged as a friendly environment for beginners, it has turned into a tool that has enough features for serious programmers. By the time VB 6, the latest version of the classic Visual Basic, was released, there were approximately ten times more VB encoders in the world than in harsh C ++ in the world. And they did not just create mock-ups of toy apps. Visual Basic has made its way to company offices and even to the Internet with ASP (Active Server Pages), another monstrously popular technology. Thanks to it, you could create web pages that can communicate with VB components, communicate with databases and write HTML on the fly.

All this happened with virtually no structure, unless you decided to create it yourself. It was an unwritten rule in Visual Basic - it gave you freedom, which you will later regret.

The problem of classic VB

In many circles, the classic VB had a bad reputation. OOP fanatics often complained that VB lacked inheritance support. (This was a strange complaint, because inheritance is often a great way for inexperienced developers to shoot themselves in the foot - this is not what VB needed.) In fact, the classic VB was not inclined to object orientation. Toward the end of his life, he already supported interfaces, polymorphism, and class libraries. All this was borrowed from COM - the fundamental part of component technology, “flashed” in each version of Windows.

The real problem with classic VB was that it was toosuccessful. He so effectively reduced the barriers for new programmers that almost anyone could work in it. Carefree beginners, tired company employees and students solved problems that would have been much more complex on any other platform, and hung spaghetti code everywhere.

In other words, since VB was easy enough to use, even if you did not study as a programmer, it was used by many people who did not learn to be programmers. And VB did nothing to prevent the rooting of their bad habits.

VB.Fred and the .NET platform

Fast forward, in 2002: Microsoft is committed to what Microsoft does best - it destroys its own ecosystem of developers by introducing a completely new way of working.

This time, the project was a major change in the architecture of COM, a component technology that supported Windows (and, indirectly, classic VB). It was an all-in rate for a megalith company that had already made such risky changes several times.

Microsoft called this "reboot" the .NET platform for many dubious reasons, including because Internet technology at the time continued to be fresh and exciting, and also because .NET included the web services feature that Microsoft firmly decided to promote. The product was created under the strong influence of Java and had a full range of tools for communicating with databases, creating websites, writing multi-threaded programs, establishing connections through sockets - for almost all applications that business developers could imagine.

The only problem was that in order to implement all these functions, Microsoft had to get rid of almost all of the classic VB.

If you squint heavily, the new version called VB.NET looked almost the same. But many large and small revolutionary changes appeared in it. Large: old VB programs remained trapped in the world of old programs, and the surprisingly weak migration wizard could hardly fix it. Small: classic VB programmers had to get used to a new way of counting array elements. They could no longer start at 1, like ordinary people. Now they had to start at 0, like official programmers.

Another important change: no more edit-and-continue function.

Developers love to complain, and VB developers are especially known for this. Almost immediately, a group of influential VB developers dubbed Microsoft's new programming environment VB.Fred, to emphasize the fact that this new language is not Visual Basic.

What doomed Visual Basic to death

You can assume that .NET changes caused cracks in the VB foundation and led to the inevitable decline. But everything was different. In fact, despite the fact that VB.NET has moved in a new direction and has made critical changes, making it an “orphan” absolutely good code for classic VB, it has gained immense popularity. This happened due to the fact that VB.NET gave something that developers on the classic VB could not achieve before - respect.

In the .NET world, the VB and C # languages ​​have the same weight. Each line of code in VB can be translated into an equivalent line of code in C #, and vice versa. Both languages ​​have the same features, use the same components, and compile in exactly the same way (into something called an intermediate language) VB has finally freed itself from its ugly duckling syndrome.

But turning into another respectable programming language has created a problem. The enthusiasm that made VB the favorite language of such an extensive group of people has disappeared. Not because VB has changed, but because C # has changed.

As soon as VB got the same power as C #, C # also adopted the convenience of Visual Basic. For example, the presence of type safety features and .NET memory management meant that C # developers no longer had to worry about memory leaks, just like VB developers did.

In other words, C # now has a “safety net” that protects amateurs, students and beginners, and does not weaken its power. Suddenly, VB ceased to be something special. It has become just another tool from a set of skilled programmers.

Current state of Visual Basic

Today, Visual Basic is in a weird state. Among professional developers, it occupies about 0% of attention - VB does not even appear in surveys of professional developers or in the GitHub repositories . However, he is still alive - he manages Office macros, old Access databases and ancient ASP web pages, and also attracts newcomers to .NET. The TIOBE index, which measures the popularity of languages ​​by search results, still puts VB in the list of the five most discussed languages.

But it seems that the inertia of language development has recently come to an end. In 2017, Microsoft announcedthat will start adding new language features to C # that may not appear in Visual Basic. This change does not return VB the status of an ugly duckling, but it harms its status as part of .NET.

Frankly, the tendency to push VB to the sidelines began a few years ago. Serious developers know that the key parts of .NET are written in C #. They know that C # is the preferred language for presentations, books, courses, and workshops. If you want to speak VB, then this will not harm the applications you create, but may limit the ability to communicate with other developers.

One of the niches in which Visual Basic should feel natural is the educational market. But even there he remains a black sheep. Modern languages ​​like C # and Python are simple and safe enough to be chosen as the first language to be learned. If you need something simpler for children, then the market is filled with graphical programming tools like Scratch. The curly-braced languages ​​are also attractive: C #, C, JavaScript and Java. They have a similar syntax, and a person who has learned one of them will feel confident with the other.

In the field of web development, Microsoft is looking into the void of missed opportunities. Who would not be seduced by a version of VB that is as easy to use as VB 6, but also capable of compiling in JavaScript and combining with an HTML form designer? Yes, you won’t create new Google Maps in such a tool, but it could revive the appeal of Visual Basic by allowing business developers, students and amateurs to create simple online applications without the need for cumbersome JavaScript. Instead, Microsoft created a VB-based product called LightSwitch , which disappeared with the death of the Silverlight browser plugin. If Microsoft starts to create yet another “coding for the masses” class product, then it will most likely be a template-driven tool with a bit of code likePowerApps .

Visual Basic used to face different dangers. But this time, it seems, everything is different. It seems that the sun is actually setting for one of the world's most popular programming languages. If true, then Visual Basic will not fade over decades. It will become another Legacy product, an underrated tool without the love of users and the future. Whether we lost something special, or simply saved the tormented technology from torment, it's up to you.

Also popular now: