Click here to Skip to main content
Click here to Skip to main content
Go to top

The Culture of VB versus the Culture of C#

, 24 May 2013
Rate this:
Please Sign up or sign in to vote.
This article describes the cultures of VB and C#.

Introduction

There is an old article that claims to describe the benefits of using C# instead of VB. The article claims it discusses this issue based on the culture of these two languages. Actually, the article completely fails to describe the culture of each language; it doesn’t even give any definition of the term “culture”! It talked too much about the history of each (with much of wrong info), and at the end slipped down in the syntactic and semantic comparisons giving much of the author opinions rather than objective conclusions. You may not believe this, but the cultures of the languages in the whole article are described in only a line or two!! I don’t want in this article to discuss the sloppy approach of that article because there are very good programmers that have already done so; see for instance, “VB Defamation Indeed!” written by Giancarlo Aguilera:

http://www.codeproject.com/Articles/10264/VB-Defamation-Indeed

I write this because – unfortunately – there is still modern links that refer to that article as if it is a holy reference about the cultures of C# and VB. I want to give a clear explanation what the culture of each language is, and at the end you will see that there is no such thing as better culture, but just a “preferred culture” according to every programmer and every task.  

What do we mean by a culture? 

The culture, as understood by most people, is the achievements of all types of a society. In programming languages; however, I shall define the culture as the achievement which addresses some habits that encouraged or obligated by the compiler and the developing tool. I chose this definition regardless of the applications developed in each language because, simply, VB.NET and C#.NET are in a whole very equivalent; the application that could be done by one of them could certainly be accomplished by the other. I have included in this definition the effect of the developing tool which is very important; although it is generally overestimated. In fact, a poor language, with excellent developing tool, could be much more productive than excellent language with a poor developing tool (of course within the limitations of the poor language). A clear example of this has really happened in history; when comparing VB6 to C++. C++ is much more powerful than VB6 at the level of the code, but a VB6 programmer can draw in a minute what may take hours to draw in C++. The C++ power appears only when VB6 fails to accomplish some tasks.

Visual C#.NET Culture  

In order to understand the culture of C#, we have to take a look at its initiatives. C# is a C-style language that was built on the shoulders of C++. Java has had also some influence. Each of these languages has proven its greatness in the programming world. The intuitive question here is: If C++ is great, what is the need of C#? That is, why should we have both Visual C#.NET and Visual C++ .NET keeping in mind that both of them are C-styled? The answer was that C++ is great, but C++ has inherently syntax and semantics that allow the programmer to do much of logical mistakes that could not be caught by the compiler. At the level of the grammar of C++, the code may be correct, but it may do something different of what’s going on in the mind the programmer.

C# has been designed taking this seriously. The result is that C# is a very strict language (much more than C++) that forbids much of the habits that may cause unnoticed logical errors. For example, C# does not allow: Implicit casting from Integer to Boolean, the use of global variables, and the use of pointers unless the block is clearly marked by the “unsafe” keyword, and much more. Although such strictness slows down the developing process, yet it may decrease the time of debugging and fixing errors. Anyway, C# is now a RAD tool because of the imitated IDE from Visual Basic – it is one of the initiatives of C# to learn from the other languages.

It is safe to say that C# has never got the raw power of C++ because it has missed much of its good features that gave its horse power. For example, the use of pointers in C# is very limited which makes them in 99% of applications have very little use – if they have at all; yet, C# is much easier to learn and to program with than C++.  In comparing to VB, C# has a little bit more power than VB, but such power could not be noticed in most types of applications. C# still needs many improvements to be just as easy as VB. In short, C# is a choice that lies between C++ and VB.NET with respect to easiness and power. Much of programmers around the world prefer such a choice.

Returning to the C# culture, the C# compiler, accompanied with its IDE, provides an excellent developing tool guided by a specified culture. The C# compiler tells its programmer the following: “Hey programmer, be careful and act slowly, we don’t want to spend ages fixing bugs! I won’t let you do anything suspicious, and if you forget the “break” keyword when using the “switch”, I shall whack you upside the head with a pillow!” To summarize the C# culture: It is a developing environment that is extremely strict, careful, safe, clear, and very consistent. 

VB.NET Culture  

Now, let’s talk about Visual Basic. Visual Basic is a language based mainly on the syntax of BASIC whose letters are the acronyms of “Beginners All Symbolic Instruction Code”. The name tells us that this language is designed mainly for beginners. Because of this, BASIC was initially a very poor language. In 1991, Microsoft released the first edition of Visual Basic, and then improved it successively until 1998 with the release of VB6. The Visual Basic syntax was similar to the BASIC syntax with some necessary modifications to make it compatible with the “Visual” style programming. At that time, Visual Basic was still considered as a poor language.

By time, something interesting has shocked the world with this language – it is very fast to build applications with Visual Basic! Much of beginners, who had started programming with VB, continued to use it in real jobs and got much money. In many cases Visual Basic programmers seemed to be more productive than their peers in other languages. Visual Basic proved it is much more than just a language for beginners. By time it had its own culture that differs dramatically from the other languages. The weaknesses of the language have all been recovered with the release of Visual Basic .NET; making it a first class programming language, but at the same time, keeping its spirit that puts the programmer’s productivity at the top of the priorities’ list.

The productivity of Visual Basic appears in different aspects. For example, the IDE requires the programmer to just type the minimum where the IDE completes the code automatically. The intellisense of VB.NET is the best of all other .NET products. Visual Basic does allow the use of global variables. It also allows reduce qualifying to the level of the classes, which at the end reduces typing, and much more aspects that are unique to Visual Basic.

It is of the culture of Visual Basic to support a programming language for the programmers of different levels. Whether the developer is a beginner, average, or a professional, Visual Basic can give him what he needs. There is defamation about VB that it is a dirty language because of features such as implicit casting from double to integer. However, VB allows but does not oblige this. It allows such data conversions for beginners who start learning VB because they just want to focus on the logic of the program and not on the technical details. If a beginner types, for example, “Label1.Text = V”, then the VB compiler understands that the programmer wants to display the value of V in Label1 – whether V is a string, integer, double, or even the pillow mentioned above! It may be worth mentioning that VB does not allow implicit casting when the intention of the programmer is ambiguous or not clear; for example, the compiler – even with option strict OFF – does not allow passing a “Double” to a method that is supposed to accept an “Integer” but overloaded to accept a “Single”. VB implicit casting is not just a random behavior implemented to make beginners happy, but it is a smart behavior of a smart compiler that understands what is going on in the mind of the programmer. Anyway, Professionals can always turn “Option Strict” On, and work with relatively strict and clear environment.

The VB compiler, accompanied with its IDE, is designed to help the programmer accomplish his work as fast as possible. The VB culture is that the programmer should focus mainly on the logic of his application, and not to be dipped in a pond of technical details. What the VB compiler tells its programmer is as follows: “Hey programmer, be careful, I shall not prevent you doing anything you feel good, do not waste any time; we have stuff to be delivered tomorrow.” In summary, the VB culture is a developing environment that is relatively forgiving allowing the programmer to be faster and more productive.  

Conclusion 

We have seen that the culture of the programming language is not something to be assessed as a good or bad; the culture has nothing to do with the power and efficiency of the language. The culture is just a description of prominent traits which encouraged and sometimes obliged by the developing environment. If you feel comfortable with a careful, strict, and safe environment, then C# will make you happy. However, If you like to program with a fast pace, then VB will be your better choice. It should be noted that when choosing a programming language, other factors should be considered such as the type of the application, what language other team members use, deadlines for delivering the product and much more; this article however, has just discussed only the culture.

Finally, I hope this article helps clarifying the culture of each of C# and VB. If you feel there is something wrong in this article, please tell me, I may correct it if you give me good reasoning. Anyway, thanks for reading the article. All comments are welcomed.  

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

BBGq

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 5 PinmemberMihai MOGA13-Jun-13 20:52 
GeneralRe: My vote of 5 PinmemberBBGq14-Jun-13 1:11 
GeneralMy vote of 1 PinmemberPushparaj Adigopula13-Jun-13 5:37 
GeneralRe: My vote of 1 PinmemberBBGq13-Jun-13 6:58 
GeneralMy vote of 5 PinmemberVitorHugoGarcia11-Jun-13 3:20 
GeneralRe: My vote of 5 PinmemberBBGq11-Jun-13 5:18 
GeneralI agree PinmemberJhonathan Izquierdo7-Jun-13 9:39 
GeneralRe: I agree PinmemberBBGq11-Jun-13 5:17 
GeneralMy vote of 4 PinmemberSouthmountain24-May-13 8:04 
GeneralRe: My vote of 4 PinmemberBBGq24-May-13 8:50 
QuestionNot an article Pinmembermark merrens24-May-13 5:07 
GeneralMy vote of 1 Pinmemberervegter23-May-13 20:04 
GeneralCulture? [modified] Pinmemberervegter23-May-13 20:03 
GeneralRe: Culture? PinmemberBBGq24-May-13 0:45 
GeneralMy vote of 2 PinmemberPaulo Zemek23-May-13 4:13 
GeneralRe: My vote of 2 PinmemberBBGq23-May-13 8:45 
GeneralRe: My vote of 2 PinmemberPaulo Zemek23-May-13 8:59 
GeneralRe: My vote of 2 PinmemberMattDavey23-May-13 22:33 
GeneralRe: My vote of 2 PinmemberBBGq24-May-13 0:51 
GeneralRe: My vote of 2 PinmemberPaulo Zemek24-May-13 3:15 
GeneralRe: My vote of 2 PinmemberBBGq24-May-13 4:38 
Question[My vote of 2] Re-visit your views from this article in twenty years time PinmemberGuyThiebaut23-May-13 2:18 
GeneralRe: [My vote of 2] Re-visit your views from this article in twenty years time PinprofessionalLeandro Taset23-May-13 4:21 
GeneralRe: [My vote of 2] Re-visit your views from this article in twenty years time PinmemberGuyThiebaut23-May-13 8:47 
AnswerRe: [My vote of 2] Re-visit your views from this article in twenty years time PinmemberBBGq23-May-13 8:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 24 May 2013
Article Copyright 2013 by BBGq
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid