An Old Programmer Looks at VB.NET and C#

Yes, we made some changes to VB, and there's been some griping about it. I was griping too, until I really looked at them. They make VB functions fully compatible with those written in other languages; for corporate developers in a heterogeneous environment, that's important. They're also "correct" from a programmatic standpoint; VB developers, never let a C++ dude make you feel inferior again!

I do suggest you make ByVal and ByRef your best friends. If you're unsure in any given situation, you almost certainly mean ByVal. No, don't write me about this; I know it's not quite that cut-and-dry!

(Here's one way to remember ByVal and ByRef. Supposedly Niklaus Wirth, the inventor of Pascal and Modula-2, was asked how to pronounce his name. He responded, "If you call me by reference, it's VEERT; if you call my by value, it's WORTH.")

C# is a very nice language, one that by default protects programmers from themselves a la VB and Java — but that allows them when necessary to do the specialized kinds of programming tricks usually thought of as the province of C/C++. Of course, being a nice language doesn't guarantee its future; not many folks use the aforementioned Modula-2 today. For IT, I still recommend VB as the base language for productivity — that is, the fastest route to the least buggy code. If you can do it in a browser, you should do it in a browser (VB Script). Program not just Office automation but a wide variety of small "skunkworks" projects in VBA, especially if there's a database involved. For larger projects, use VB, or maybe Java-the-language. And for the really tough stains, apply C#; it affords the power and reach of C/C++ with what I would suggest is more sanity. (And this is coming from someone with over a decade of commercial experience in C and assembler.)

Although I haven't done anything serious in C# and cannot personally vouch for this, our own IT and microsoft.com tools developers are saying that they're significantly more productive in C# and the .NET framework than they were with C++.

Back to Editor's Note.