Bob Grommes said:
2) Politics. There is a 99% bogus, yet persistent, perception abroad in the
world that VB.NET is a "toy" language and/or that it is not for "serious"
projects (whatever precisely those might be) and/or tends to attract less
skilled developers. Conversely there is a 99% bogus, yet persistent,
perception abroad in the world that C# is an "adult" language and/or that it
is more elegant / faster / better / grows hair on your chest and/or attracts
the better developers.
I would argue that there are a number of ways in which C# genuinely
*is* more elegant, mostly because it doesn't have the baggage you
mentioned earlier. (And while I agree that going forward it will end up
having "earlier version baggage" I don't think there'll be nearly as
much - partly because VB is a much larger language than C#.)
I'm thinking of things like the way that C# doesn't let you access a
static member via a variable - so while in VB I could create a new
thread and call:
t.Sleep(5000)
C# would disallow this, forcing you to write
Thread.Sleep(5000) instead.
The VB.NET version is unclear - if you didn't know the framework well,
you might think it's telling the other thread to sleep for 5 seconds,
rather than the current thread.
The ability in VB.NET to pass properties by reference, which generates
"copy into temporary variable, pass temp variable by reference, copy
out of temp variable" code is another example - it's just *nasty* to
hide things like that and make it look like passing a property by
reference is the same as passing a variable by reference, when they end
up having very different semantics.
While there are certainly flaws, C# is a very, very elegant language in
general. I think it really is reasonable to say it's more elegant than
VB.NET. (The "attracts the better developers" idea is an interesting
one. I have no idea whether that's true or not, and I suspect no-one
else does either. It would be interesting to know though.)