OO Keywords in VB and C#

As I was sitting in the MSDN Event today listening to the “”OO in VB.NET” talk, something kind of occurred to me (actually, it re-occurred to me as this is something I thought about a ways back but kept forgetting to blog it). I'm not sure what you call it, so I'll just try to explain it.

Compare a few OO keywords in C# and VB. For example:

  • C# has abstract, VB has MustInherit
  • C# has virtual, VB has Overrideable
  • C# has static, VB has Shared

When learning OO concepts, in school or otherwise, terms like abstract, virtual, and static are taught. Each of these terms have their own definitions, which might go like something like this:

  • abstract: used to define base classes from which other classes must inherit from; an instance of an abstract class cannot be created
  • virtual: used to exhibit polymorphic behavior so that a given method is overrideable, thus allowing one class to implement the method differently from another class
  • static: used to define a method that is shared between all instances of a given class

My highlighting should show you the connection: C# uses actual academic OO terms as keywords in its language while VB uses the “friendly” normal english definition as its keywords.

I find this very interesting as it really does show the distinctions in the languages and how better suited to acedemia C# is than VB, and the flip side of that in how much VB is better suited to hobbyists. Hobbyists will have a much better shot at understanding words like shared and overrideable than static and virtual.

Print | posted on Tuesday, October 26, 2004 10:07 PM

Feedback

# re: OO Keywords in VB and C#

left by Dennis Webb at 11/1/2004 12:38 PM
So, let me understand the reasoning (or lack there of) here.

We can agree that you can do the SAME things in VB.Net as C# (I have personally converted C# code to VB and vice versa). They are virtually the same programming language with different syntax. So, because VB makes it easier, more English like, and easier to read, that makes it more suited for a hobbyist?

"Hobbyists will have a much better shot at understanding words like shared and overrideable than static and virtual."

It seems to me you either understand the concepts (OOP, or Structured Programming) or you don't. Semantics really don't matter. In fact by your reasoning, a hobbyist would probably have read some OOP for dummies book, and it would have mentioned abstract, and virtual, etc and they would be more comfortable programming in a language like C# or Java that uses the same nomenclature as what they just read.

I have personally worked on several enterprise level applications using both C# and VB.Net. They are both excellent programming languages, and equally powerful. Too bad VB.Net still has this Hobbyist label that has been around since it was BASIC. Perhaps some day people will respect it for what it is.

What exactly is a hobbyist programmer anyway?

# re: OO Keywords in VB and C#

left by Dave at 11/1/2004 12:52 PM
Excellent points, Dennis. And I agree with you. I've spent most of my career using VB and now work with VB and C# equally. And yes, I also feel it's a shame that VB is still labeled as something for hobbyists. I was just making an observation about the differences in some of the keywords used in each language.

But you can't argue the fact that VB is the most widely used language in the world because it does make it easier for your traditional non-professional-developers to develop line of business apps.

I also don't think that your typical hobbyist is out there reading an OOP for Dummies book. They don't care about the concepts. They just care about getting something done in as little as time as possible so they can get back to their real job.

# What the heck is a Hobbyist Programmer

left by Dennis Webb at 11/1/2004 1:01 PM

# What the heck is a Hobbyist Programmer

left by Dennis Webb at 11/1/2004 1:02 PM

# re: OO Keywords in VB and C#

left by Dennis Webb at 11/1/2004 1:10 PM
Agreed, seems to me most 'Hobbiest' programmers are out there writing Access Applications, and using VBA. That has been my experience, anyway. Good post, got me thinking, and that is HARD to do!

# re: OO Keywords in VB and C#

left by Melvin Ng at 5/14/2005 12:05 PM
I am a fresh developer using .NET framework and .NET development tool, I agreed VB.NET syntax is easier to understand and easier to use. I believe all the bosses won't care how the programming syntax looks like, they are more concern when the system can be developed. Since VB.NET and C# will compile to be the CRL, and managed by .NET framework. So the developer should choose the easiest programming language to develop their system, instead of the caring of what syntax to use. For me, I prefer to use VB.NET, but sometimes I have to use C# for some projects that the boss insisted to use C#. It's funny, it's because some people still thinking the C/C++/C# language must be the best language, compare with using the VB/Power Builder/Delphi etc... Actually I learn C# through the understanding from VB.NET syntax? Shame on me? I don't think so, I just want to shortern my development time and pay more time on the system business logic with my project. So what do you think dennis?
I am melvin, a junior programmer from Malaysia.
melvinng05@hotmail.com

# re: OO Keywords in VB and C#

left by dim at 8/24/2005 2:32 AM
syntax

# re: OO Keywords in VB and C#

left by fuzz at 9/8/2005 1:30 AM
this is a rather common error -
semanitcs are what things mean, as opposed to syntax.

"Semantics really don't matter." <- should read "syntax really doesnt matter".

# re: OO Keywords in VB and C#

left by Gareth Stephenson at 3/23/2006 5:29 AM
Something to add, seeing as we're talking about OO.

C# has base, VB has MyBase
C# has this, VB has MyClass

Two rather important objects (or pointers) with regards to OO and inheritance.
Comments have been closed on this topic.