# Visual Basic > Visual Basic FAQs >  Comparison between languages

## Nightwalker83

Hi,

This thread explains all the comparison, advantages/disadvantages of one particular language or framework over another particular language or framework. Here are the questions with answers I have included in the FAQ so far:

What is the difference between Visual Basic 6.0 and Visual Basic .NET?
What is the difference between Visual Studios and Visual Basic?
How many different versions of the languages or Visual Studios are there?
Why is C# better than Visual Basic.NET?
Visual Basic.Net from a historical point of view (looking back on VB in the past)
Why is Visual Basic.NET better than C#?
Advantages/Disadvantages of using C#


Nightwalker

----------


## Nightwalker83

What is the difference between Visual Basic 6.0 and Visual Basic .NET?

There are quite a few differences in VB6 and VB.NET. We will highlight some of these here in points:
	The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB.NET uses the .Net Common Language Runtime (.Net CLR). The CLR is much better designed and implemented than VB-Runtime. The CLR uses better code translation through Just in Time compiler while VB-Runtime interprets the code. The CLR Garbage Collector is also more efficient than VB6 one as it may detect cyclic references too. 
	VB6 was interpreter based language while VB.NET is a compiled language 
	VB6 was not a type-safe language while VB.NET is a type safe language. There is no variant type in VB.NET and no magical type conversions happen in VB.NET 
	VB6 used On Error Goto syntax to handle exceptions at runtime. VB.NET uses the TryCatchFinally syntax to handle exceptions at runtime. 
	A lot of code (like user interface code) in VB6 was hidden from developer. In VB.NET no code is hidden from developer and you can access and control each part of your application
	VB.NET has much enhanced object oriented support than VB6 
	VB6 does not allow developing the multithreaded applications. In VB.NET you can create multithreaded applications. 
	VB6 was only considered good for desktop windows application. In VB.NET you can also develop web applications, distributed applications, create .NET windows and web controls and components, write windows and web services. 
	In VB.NET, you can also use reflections to read the meta-data of types and using reflection emit you can also generate code to define and invoke types at runtime. 
	VB.NET uses .NET framwork class library along with specialized VB library (System.VisualBasic) as a standard library. As a result, the standard library for VB.NET is much enhanced and useful compared to VB6 standard library 
	VB.NET is platform independent because of .Net framework. Programs written in VB.NET can run on any platform where .Net framework is present. The platform include both hardware and software (operating system) platforms. 
	VB.NET also supports language interoperability with various .NET compliant languages. This means that you can use and enhance the code written in other .NET compliant languages. Similarly the code written in VB.NET can also be used and enhanced by other .NET compliant languages. Although VB6 also provided this functionality through COM but it was limited and difficult to use and manage. VB.Net makes it easier because of the presence of Intermediate Language (IL) and Common Language Specification (CLS) of the .NET architecture. 
	VB6 uses COM (Component Object Model) as component architecture. VB.NET uses assemblies as its component architecture. The Assemblies architecture has removed a lot of problems with COM including DLL-Hell and versioning problem. 
	Components created in VB6 (COM) need to make and update registry entries. VB.NET does not require any registry entry making the deployment easier 
	VB6 used ASP to build web applications. VB.NET uses ASP.NET to build web applications. 
	VB6 used ADODB and record-sets to implement data access applications. VB.NET uses ADO.NET and datasets to build data access applications. The ADO.NET also supports the disconnected data access. 
Borrowed from: http://www.programmersheaven.com/2/F...ET-Differences



What is the difference between Visual Studios and Visual Basic?




> Visual Basic is both an IDE and a programming language.  Visual Studio is the Microsoft IDE for .NET programming and more.  There are various components to Visual Studio, each designed for development using a specific language or technology.  The Visual Basic component is an IDE for Windows development with the Visual Basic language.  The Visual C# component is an IDE for Windows development using the C# language.  The Visual C++ component is for Windows development using the C++ language, which includes both unmanaged (non-.NET) C++ and C++/CLI (.NET).  The Visual Web Developer component is for web development using the Visual Basic and C# languages and the ASP.NET technology.
> 
> The four components mentioned above also come in free, standalone Express editions.  Apart from that, Visual Studio also supports components from Microsoft for SQL Server development (up to VS 2008 so far), Windows Phone 7, F# and XNA.  Visual Studio is also extensible, allowing third-parties to create components that plug-in and support other languages and technologies.
> 
> If you are interested in learning VB development then you should start by downloading and installing VB Express and, if you want to learn web development, VWD Express.
> 
> http://www.microsoft.com/express/


How many different versions of the languages or Visual Studios are there?

See the Microsoft Visual Studios wiki page:

http://en.wikipedia.org/wiki/Microsoft_Visual_Studio

Why is C# better than Visual Basic.NET?




> This article is intended to help people facing the C# or VB debate that is raging over the internet. You will notice that there are no code examples, no side by side comparisons and most importantly there are no lengthy paragraphs. Essentially what you have here is a genuine article devoid of all the useless nonsense that permeate other articles of this nature.
> 
> First let me start with the most asked questions. Bear in mind that these are my views and that they are based on using code for production not academics. This is because I'm sure you eventually want to make money out of programming and academic coding is wildly different to production coding.
> 
> *Which is the most powerful:*
> Technically C# is the most powerful simply because it allows the use of unmanaged code. While many people will argue that VB has, for instance the MY namespace many of VB specific features tend to be wrappers to make certain tasks easier. This means, while C# does not have the MY namespace it can still achieve all of its functionality. If VB gained the ability to use unmanaged code it would be functionally as powerful as C#.
> 
> *Is C# safer than VB:*
> No, option strict and explicit exist to allow the language to be more flexible, if they are used incorrectly this is not the languages fault. Using option Strict/Explicit is analogous to using pointers in C#. Academically they should be avoided but production code sometimes requires a less than perfect approach to coding for a number of reasons.
> ...


Another of the about type of discussions:
http://www.vbforums.com/showthread.php?p=3521166

----------


## Nightwalker83

Why is Visual Basic.NET better than C#?

 Top 10 reasons VB.NET is better than C#

Advantages/Disadvantages of using C#
Taken from here 

PROS:   
For many, C# has a familiar syntax in that it follows C.Fully integrated with the .NET library, providing access to a great repository of functionality and support.Safer than its namesakes (C/++) in that pointer types are not permitted. .NET Library - ever expanding, lots of predetermined classes.It's like java and c++ combined, and that makes it a very powerful language, and since I know both of those two language I find it very easy to create applications. Also the .net library is really good.the just in time compiling method is great, saves time and beats a virtual machine.It is easy to remember syntax.The garbage collector saves you the trouble of freeing memoryJava's step child, near identical to Java, but with benefit of experienceDelegates - offer a clean event model and more elegant codeEvents - can't be stressed enough, good clean model (VB.NET version, not so much)Properties - more explicit than classic OOP getter/setter methodsNo multiple inheritanceMicrosoft Driven

Cons:
Obviously less efficient in execution than C/++ because it is ultimately interpreted.Still allows pointers in 'unsafe' blocks.Loses any cross-platform capabilities because of the integration with .NET.No multiple inheritance (although there is a work around).Doesn't compile as fast as it's predecessor c++Microsoft DrivenCan't really do non Windows: Sorry, Mono tries, but...

Visual Basic.Net from a historical point of view (looking back on VB in the past)




> VB was pretty much designed as a programming language for non-programmers.  As a result, while a good developer can write very good VB code, it's also very possible for a bad programmer to write very bad VB code that will still work.  It's possible to write bad code in any language but, because VB is so forgiving, it's far easier to make a program work with bad code and little real understanding in VB than many other languages.  VB got a bad rep for two main reasons, one mostly deserved and one not so:
> 
> 1. Far too many VB developers didn't take enough pride in their work to develop a genuine understanding of what they were doing.  VB made it much easier to take a "path of least resistance" approach, and many people did.  Many developers from other languages were right to disrespect people who wrote bad code because VB let them.  Unfortunately, that disrespect tended to be directed and those VB developers who did take pride in their work too.
> 
> 2. VB made programming easy.  Many developers, those from C/C++ particularly, wanted programming to remain an exclusive club.  If any idiot could program, that made them less special.  Because VB was like using Duplo blocks (little kids Lego) compared to using Mechano in C/C++, VB developers were considered a lesser species of developer, even if some of them would have been smarter people than those looking down on them.
> 
> VB.NET does continue the tradition of making programming easier for the beginner than many other languages.  That said, it has inherited its bad name from VB6.  If VB6 and earlier versions had never existed, no one would have an issue with VB.NET.  Just live with it and laugh at them while you relax for a few weeks after completing your application while they continue to struggle with theirs that doesn't look as good or do as much.

----------


## techgnome

Since you went this way: 
Why is C# better than Visual Basic.NET?
and
What is wrong with Visual Basic.Net?

you really should go the other way:
Why is Visual Basic.NET better than C#?
and
What is wrong with C#?


Also... I wouldn't call what JMC posted there in your quote as "what's wrong" with VB... it's more of a historical perspective on "Why there's this negative perception of VB." Inherently there is nothing wrong with VB. Well, there are a few "features" of VB I'd like to see gone, but that's related to what's really wrong and that is: people abusing the language. and that goes to point 1 in jmc's posting.

-tg

----------


## Nightwalker83

> Also... I wouldn't call what JMC posted there in your quote as "what's wrong" with VB... it's more of a historical perspective on "Why there's this negative perception of VB." Inherently there is nothing wrong with VB. Well, there are a few "features" of VB I'd like to see gone, but that's related to what's really wrong and that is: people abusing the language. and that goes to point 1 in jmc's posting.


Fixed! I also, added just some of the information on why VB.NET is better than C#. Although, I will probably add more links to external arguments later on.

----------


## Shaggy Hiker

From a purely mechanical perspective, VB also has the great benefit that it is easier on your hands....assuming that you can type, which is an assumption is becoming increasingly safe as computers dominate the landscape. Any typing course will teach you to keep your fingers on the 'home row'. VB makes much greater use of the characters, while C-style languages make much more use of symbols. Symbols are all located as Shift+something (except a few, I suppose), and that something is often found on either the top row, or around the perimeter of the keyboard. For a fast typist, those characters act like speed bumps. We may be stuck with the QWERTY layout to our keyboards, but why exacerbate the problem by using a language that requires hand-stretches to accomplish anything?

Another point I would make is that the C language was developed several decades back, and it shows. At the time that C was developed, there wasn't enough reserve computing power to allow for case-insensitive coding. What VB does, with correcting casing on the fly, was a luxury that was readily ignored when C was new. That legacy is with us still, though it is a pretty poor legacy. After all, no competent programmer would write code that used two variables that differed only in their case. That would be a maintenance nightmare. So why are C-style languages still case sensitive?

A similar issue related to that is the semicolon. C-style languages used the semicolon to indicate where the lines ended. That made a modest amount of sense at a time where computational power was at a premium. However, it was ultimately a mistake. What early VB did was use a line continuation character. Therefore, in VB, you had to actively indicate that the line continued to the next line of code, whereas in C, you had to actively indicate when the line ended at the end of the line. I don't know a single C coder who has not spent significant time dealing with a bug that resulted from leaving off a semicolon, whereas I know few VB coders who ever used the line continuation character at all. Furthermore, if they did use the continuation character, they were taking an active step to indicate an unusual situation rather than having an unusual situation arise by an oversight. Worse yet, the more recent VB.NET compilers don't even require the continuation character at all. It is never necessary to indicate the end of a line, since modern compilers are smart enough to figure it out on the fly, but that advantage hasn't made it to C-style languages yet, where the absence of semicolons is still causing hair loss to this day. Fortunately, the semicolon is one of the easiest symbols to type.

----------


## Nightwalker83

More VB6/.NET comparison information can be found here.

----------


## techgnome

Sweet! resurrecting an old post to link to a post 4, almost 5 years out of date. :P I do believe we have arrived.

-tg

----------


## Nightwalker83

> Sweet! resurrecting an old post to link to a post 4, almost 5 years out of date. :P I do believe we have arrived.
> 
> -tg


I am not entirely sure what you mean but that? However, since VB6 itself is out of date I guess it doesn't matter. I posted the link here after another for member asked about comparisons between how fast VB.NET and VB6 were at preforming the same functions.

----------

