Welcome!

.NET Authors: Brad Abrams, Alin Irimie, Colin Walker, Maureen O'Gara, Reuven Cohen

Related Topics: .NET

.NET: Article

Opinion: Why C# Is Not a "Better" Language Than VB.NET

"People who talk that way about VB.NET are confusing three issues," says Michael Stiefel

When the speakers on the .NET track of SYS-CON's Web Services Edge 2005 East conference got together, Carl Franklin and I were talking about why people think that C# is the "official language" for .NET.

I told Carl that, even though most of my consulting is in C#, I think that attitude is wrong. I believe it is important to elaborate why I feel this way.

People who feel that VB.NET is an inferior language to C#, or that somehow C# is a "better language", or the "official language" for accessing the .NET Framework Class Library are just plain wrong. My personal opinion is that I prefer C# to VB.NET because I like the compact syntax among other things, but that is a personal judgement.

People who talk that way about VB.NET are confusing three issues.

First, suitability to access the Framework Class Library (FCL). Every example in my book Application Development Using C# and .NET has been translated into VB.NET and works exactly the same way. I have used the same courseware for both C# training and VB.NET training with the only difference that the examples were in the different languages. From the point of view of the FCL, everything C# can do, VB.NET can do as well.

Second issue: suitability to a given task. Equality before the FCL, or the Common Language Runtime is not everything. Perl.NET can do things that C# cannot. Does that make Perl.NET a better language than C#? No. It just makes it a better choice in some cases. If you need to use unsafe mode, you need C#. You cannot overload operators in VB.NET. You might find VB.NET's late binding feature more convenient than using the reflection API in C#. You might like background compilation in VB.NET. It is is possible, that for certain features the IL that C# generates is more efficient than the IL that VB.NET does. I do not know if this is true, but even if it is, it probably does not matter for most applications. After all, in some performance situations managed C++ is better than C#. For people interested in the differences between the languages look at O'Reilly's C# and VB.NET Conversion pocket reference.

FInally: de gustibus non disputandum est, there are matters of personal preference. I like C#'s compactness. I think it has certain advantages, but that is a matter of taste. Taste is important even in technical matters, but do not confuse taste with other factors, or mistake taste for intuition.

I wish VB.NET programmers a long and productive life. VB.NET programmers should not feel inferior.





[Read Michael Stiefel's blog, on which this Opinion piece is based, here.] 

 

More Stories By Michael Stiefel

Michael Stiefel, principal of Reliable Software, Inc. is a consultant on software architecture and development, and the alignment of information technology with business goals. His current work involves training in distributed applications development, and in software best practices, in .NET, C#, Web services, C++, SQL Server, COM, DCOM, and MTS. He advises on IT strategy and planning, including budgeting, hiring, and growth management.
Michael is involved with design and implementation of middle-tier and back-end components for transactional n-tier Internet and Intranet applications including Web services. He also is responsible for requirements analysis, project plan development, and design document development. He serves as an Expert Witness for intellectual property cases.

Stiefel was a Principal Software Engineer for Prime Computer, developing a mechanical CAD/CAM database system. He also worked for Microsoft assisting their Fortune 500 clients in developing client/server solutions.

He is a Visiting Scholar at Massachusetts Institute of Technology in the Science, Technology and Society Program and conducts undergraduate seminars on the practice of engineering.

Comments (7) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Sameer Rafiq 04/11/05 01:16:50 PM EDT

It depends alot on which language you used before coming to .NET platform. VB programmers are more comfortable with VB.NET while C/C++ programmers are more comfortable with C# because of syntax.

Brian Bischof 04/08/05 05:25:25 PM EDT

It's too bad that VB.NET has to fight against the reputation of VB6 which preceded it. MS truly rebuilt VB.NET to be a world-class development language yet it still has the reputation of being a second-class language. While I agree that C# gives you a little more functionality than VB.NET (as mentioned earlier), it's a pretty small difference that is probably only utilized by less than 5% of the C# developers.

Roger Jack 04/08/05 05:22:09 PM EDT

I think the languages are close and I think programmers should be able to pick one or the other with impunity:

http://www.rogerjack.info/2004/10/programmer-and-his-languages.html

grundSaft 04/06/05 08:21:52 AM EDT

{{{ Good article and the point on "fit for purpose" is well made. However, look at the way even MS positions VB programmers. VS 2005 IDE has no support for re-factoring in the VB.NET profile. According to some MS people this is because VB folk do more RAD and less hardcore components and re-factoring is more suitable for component development hence is only available in the C# profile. }}}

Santosh, you say you aren't a VB programmer. Why not let VB programmers speak for themselves.

Santosh Benjamin 04/06/05 06:24:53 AM EDT

Good article and the point on "fit for purpose" is well made. However, look at the way even MS positions VB programmers. VS 2005 IDE has no support for re-factoring in the VB.NET profile. According to some MS people this is because VB folk do more RAD and less hardcore components and re-factoring is more suitable for component development hence is only available in the C# profile. I am not a VB programmer, but i do think this is quite insulting to those developing components in VB.NET. Can you not develop pwerful class libraries in VB.NET? They even didnt have XML comments in VS2003 for VB folk. Why all this discrimination from MS itself?

Claudio Grazioli 04/06/05 02:17:13 AM EDT

I totally agree. The languages are more less exchangable.
But: If I'm looking for a high skilled OO programmer (who's really an OO expert) it's way much easier to find such a developer in the C# world. Because most of the C# developers have been C++ or Java developers before (or still do it). They use OO languages for a long time and are really high skilled.
VB.NET developers very often come from VB. Nothing against VB developers. They write great software. But comming to the OO skill, very often it's quite new for VB programmers.

That's why I prefer C# programmers. Because often, they are more skilled regarding to OO.

Jon Person 04/05/05 05:53:13 PM EDT

In VB.NET, you cannot create user controls for the Compact Framework. In VB.NET, you can't do implicit or explicit conversions. In VB.NET, you can't do operator overloading. I write commercial components in C# because C# has slightly more capability. I used to use VB.NET but there are just some things you can't do with it. VS.NET 2005 will close the gap somewhat.