I think there must be something wrong with my brain.
Every time I hear a Microsoft person saying how VB.Net is for the business user
, how the VB community
is all about getting the job done
against - inevitably - tight deadlines
rather than writing perfect
code, how C# is for the clever-clogs library writers who need to do “low-level” stuff, and so on, the part of my brain that would usually be making some sort of a stab at understanding what that person means and trying to understand their perspective just shuts down. I am simply unable to begin to understand what the heck they are talking about. What the heck are they talking about?
I used to write applications - yes, whole applications - in VBA, the cut-down version of VB embedded in MS Office. These were business
applications, and they were hacked out according to need in order to get various business-related tasks done more quickly and reliably than before. Eventually I was allowed to have a VB6 compiler, and I went from writing self-contained applications to producing a variety of different sorts of code objects
- executables, class libraries, custom controls and so on. Later on me and my colleagues got our hands on a web server, and we wrote ASP pages in what was basically VBScript. Been there, done that. I guess I understand the needs and the mentality of the business user
reasonably well. Trouble is, that isn’t all I understand.
Making the move from VB6 to VB.Net wasn’t hard for me. VB.Net made it easier to do some of the things that VB6 made it artificially and unnecessarily hard to do. No more faking polymorphism by defining COM interfaces and delegating calls to an instance of the base
class held as a private member variable. No more faking multithreading by starting up COM server
objects. No more futzing about with the Win32 API…well, OK, still some futzing about with the Win32 API. And imagine my surprise when I found that the AddressOf operator was still in service…
I don’t remember exactly why I decided to learn C# as well. I didn’t have a pressing need for pointer arithmetic or operator overloading, and still don’t. I do know why, once I’d learned C#, I stopped writing VB.Net. It’s really a fairly trivial reason, as the languages are all but semantically equivalent. I just happen to prefer C#’s syntax, because it’s cleaner: less redundancy, fewer unnecessary keywords.
I don’t want to have to say Dim foo As Bar when I can say Bar foo;. I don’t really ever want to see AddressOf ever again. VB.Net looks the way it does not because some language designer thought carefully about what would make a good syntax for a language and consequently designed it that way, but because it was temporarily advantageous for Microsoft to be able to persuade VB6 programmers that VB.Net was just the latest upgrade to their favourite
language. And not many of them were persuaded of that for long.
What is it that the Microsoft people are saying when they say that business users
prefer VB.Net’s rather lumpen syntax? It seems to me that they’re trying to make an argument about trade-offs: yes, it’s uglier, but you can get the job done
more quickly with it. Or, it may be awkward to do certain things with delegates in it, but it’s more suitable for RAD-style application building. In other words, they’re asserting a better fit between VB.Net and the business user’s problem domain.
But this doesn’t make the slightest bit of sense, because VB.Net is really only C# in drag with the little finger of its left hand in a plaster cast, and it consequently fits that problem domain just ever so slightly less well than C#. It just isn’t true that it takes longer to get the job done
in C# than in VB.Net, tight deadlines
or no. It also isn’t true that some of the forthcoming extensions to C#, like anonymous delegates, are needed only for the implementation of clever algorithms
in low-level code
. Actually, anonymous delegates are just another way of getting the job done
, with less redundancy.
The reason I wish VB.Net would disappear is that there isn’t any compelling technical reason for it to exist at all: it exists purely because Microsoft needed to persuade the VB6 developer community to move away from a language it was going to abandon, and it has inherited some of the cruft and ugliness of VB6 without maintaining any real continuity with that language. C# is not without its warts, and wouldn’t be my first choice for a development language, but at least it’s not a half-assed attempt to fulfil an essentially deceitful marketing promise.