Talk:Visual Basic/VB Controversy

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Controversy[edit]

Visual Basic is a controversial language; many programmers have strong feelings regarding the quality of Visual Basic and its ability to compete with newer languages. It was designed to be a simple language. In the interest of convenience and rapid development, some features like compile time type-checking and variable declaration are turned off by default. This leads to some programmers praising Visual Basic for how simple it is to use, but can also lead to frustration when programmers encounter problems that the features would have detected (e.g., a typo generating an "undefined variable" error message).

Many critics of Visual Basic explain that the simple nature of Visual Basic is harmful in the long run. Advantaced programming techniques usually required for large and complex programs might not be learned or used by programmers that have only seen Visual Basic. A famous formulation by Edsger Dijkstra was, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration [1]." (Dijkstra was no less scathing about FORTRAN, PL/I, COBOL and APL.) The main issue is with students of a single language (be it Visual Basic, Fortran, COBOL, or any programming languaage) not understanding programming techniques applicable to managing and supporting large and complex programs. Visual Basic has espically been singled out for this criticism because most software written in VB starts out as small and RAD applications.

However, many proponents of Visual Basic explain that the simple nature of Visual Basic is its main strength, allowing very rapid application development to experienced Visual Basic coders and a very slight learning curve for programmers coming from other languages. Additionally, Visual Basic applications can easily be integrated with databases, a common requirement. For example, by using controls that are bound to a database, it is possible to write a VB application that maintains information within the database without writing any lines of VB code.

The language continues to attract much praise and criticism, and it continues to cater to a large base of users and developers. Like any programming language, VB is well suited for certain kinds of applications but less suited for others.

Programming constructs not present in Visual Basic[edit]

  • Inheritance. Visual Basic versions 5 and 6 are not quite object oriented languages as they do not include implementation inheritance. VB5 and 6 do, however include specification of interfaces. That is, a single class can have as many distinct interfaces as the programmer desires. VB.NET implements the full set of object-oriented features. Visual Basic provides a specific syntax for access to attributes called Property methods, and this is often implemented using getters and setters in C++ or Java. Python has an equivalent notation to VB6's property Let and Get.
  • Threading support not present prior to Visual Basic .NET.
  • Structured exception handling prior to Visual Basic .NET. Error handling is controlled by an "On Error" statement.

While Visual Basic does not naturally support these features, programmers can construct work-arounds to give their programs similar functionality if they desire.

Visual Basic and VB.NET[edit]

File:Vb2005.gif
Visual Basic 2005

Visual Basic .NET, VB.NET, is a backwards-incompatible redesign of Visual Basic to Microsoft's .NET platform. Almost all of the above criticisms have been addressed with many of the missing features added. VB.NET has support for threading, advanced object oriented code, Try-Catch-Finally blocks. Many new features (mainly from the .NET framework) have also appeared, like remoting, web services, 64-bit integers and ADO.NET.

VB.NET is also a fully-compiled language (as opposed to previous versions which could both compile and interpret the language). Programs require compilation even if the program is only to be debugged. This resulted in a number of convenient features being removed from Visual Basic, including the quick execution of programs, and the famous edit-and-continue feature (this feature has been restored in Visual Basic 2005). Visual Basic 2005 also includes the "MY" namespace, which gives the developer a vast amount of commonly used functionality.

Note: Microsoft has officially dropped the ".net" within the Visual Studio product name for 2005.

Many of the original critics of Visual Basic now praise VB.NET for providing a "complete" language, while a few supporters of Visual Basic claim VB.NET has made the language too complicated and too hard to use for simple application development. Another criticism of VB.NET is the incompatibility and lack of similarity in syntax. VB.NET provides a wizard to help upgrade code, but many features are not converted properly. The wizard produces a list of places in the code where the upgrade is incomplete, and large projects have many thousands of such places requiring significant programmer time to complete the upgrade. In particular the Variant data type, which was the default data type is no longer supported. It is replaced by the Object type. Programs written in VB.NET must be manually converted to VB6 code if this is desired.

Some believe VB.NET support will diminish, with C# becoming the preferred language for .NET programming. This is despite the fact that both languages compile to the same .NET Common Intermediate Language, with the programming language choice merely a matter of syntax preference.