Tuesday, March 2, 2010

Why C# is used more or preferred over VB.NET?


I believe the answer to this question has mostly to do with syntax and history.
Although VB.NET is an excellent language, the problem with VB.NET has more to do with the history of BASIC than what VB.NET is today.  I can tell you that I prefer C# over VB.NET, and I programmed with Visual Basic versions 3 through 6 with much success.  However, as any ex-Visual Basic developer an attest to, Visual Basic was always viewed as a second-rate language by C++ and Java developers.  There were certainly a number of things that the C++ language would allow over Visual Basic, and not all of them were necessarily positive.  Much of the flexibility allowed by C++ was also the demise of many C++ applications.
I viewed C++ like a surgeon’s scalpel.  With a scalpel, it can take a long time to carve out a piece of art.  And, in the wrong hands you can do more damage than good, as I have seen.  However, in the right hands, you can do very good things. With C++ a developer could do virtually anything since C++ was the core language on which most operating systems were written, and the core for the Microsoft libraries.
Visual Basic was intended to address the need to rapidly develop applications for the largest share of applications needed, such as business applications.  Business applications are more about good business process logic and intuitive user interfaces, not complex user interfaces or algorithms.  Visual Basic was Microsoft's initial attempt at providing a development language to improve programmer productivity.  Visual Basic addressed this need well.
With this little bit of history, programmers who used Visual Basic were not considered by some (C++ and Java developers) to be “professional” developers.  The fact that Visual Basic had the word “Basic” in it was probably the single most dominating reason – in my opinion.  Anything that is “Basic” is probably not powerful – as viewed by many who never really ever used Visual Basic.  I must confess, I had the same biases about other database-related languages like FoxPro and DBase – and I was probably overly critical about those and other tools as well.
I personally have a great deal of respect for Visual Basic and its place in history.  For me, it was the right tool for many solutions at that time.  Visual Basic versions 3 through 6 existed during a time when companies were only beginning to see the advantages of Local Area Networks (LAN), the wide-spread introduction of the Internet and the explosion of the Internet, all of which happened during the timeline of Visual Basic.
If I may deviate a bit, during this time most companies; except for the large Fortune 1000 type companies), viewed personal computers and LAN’s as an expensive investment with very little return on investment (ROI).  This close scrutiny of Information Technology investments eventually proved to be a good investment in productivity for the average company.  The investment in technology then began to swing the other direction at a pace where many companies and investors could not throw enough money into the advancement of technology and new technology companies; and as we all know, this ended with the DOT-COM boom and bust.
Back to the original question about VB.NET or C#.  The important thing to remember is that both VB.NET and C# get their muscle from the .NET Framework.  Other than a few minor differences in functionality between the two, the decision becomes mostly driven by syntax.  I do not include functional because all .NET languages are interoperable with one another.  Again this is provided by the .NET Framework.  I personally prefer the C# syntax.  It is more like C++, JavaScript, and Java.  Although I don’t use Java, I like developing in a syntax that is more widely adopted.  I use JavaScript occasionally and as a creature of habit I like that C# and JavaScript are similar in basic syntax.  I also prefer the terminology or keywords used by C# because they are more object oriented in nature.
This is my preference from a non-technical approach.  Your comments are welcome.

2 comments:

  1. http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=92

    Great Copy!

    ReplyDelete
  2. http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=92

    ReplyDelete