Thomas Alva Edison's light bulb VBInfoZine Home
   An ordinary VB developer shares his own successes and failures
   FREE to registered subscribers.  

The dark side of the VB.NET 2003 code editor

What is the most annoying feature of the Visual Basic .NET 2003 code editor? Do you like how the 'Pretty listing' feature works?
Those were the times...

I remember the first thing I did after installing Visual Basic .NET 2003 - I've run a project, placed a breakpoint, put up the Immediate Window and typed a variable name followed by a dot...

Amazing! IntelliSense was working in the Immediate Window.

I've flipped through the "what's new" page and I've found out that the other big improvements don't really touch me:

  • I don't do mobile development, so the added support for mobile devices was out.
  • I've been using just SQL Server, so the added support for new managed data providers was out.
  • I'm not upgrading my VB6 applications at all, so the enhanced upgrade wizard was out.
  • I don't do web services development, so the improved XML web services support was out.
I've been doing mainly WinForms applications. I don't use any code generators and because I'm lazy, I've always been using all the automatic insertion and reformatting features of the VB editor (Tools | Options command, Text Editor \ Basic \ VB Specific node).

I really appreciate that the automatic insertion of end constructs for the Try statement generates not only the End Try statement, but also the Catch ex As Exception clause.

I really appreciate the automatic insertion of Interface and MustOverride members. (I'd prefer the Interface members to be generated as Private as opposed to Public, but I can live with that).

But...

I really hate the automatic removal of parentheses from default (parameterless) constructors. Here is what I mean:

Back in the VB6 days, there were no constructors and if you wanted to write a parameterless method call with empty parentheses, you had to use the ugly 'Call' statement.

Then, the first VB.NET version came out and I can't stress enough how happy I was with the first VB.NET version, when I realized that all the parameterless methods (including constructors) retain the empty parentheses. IMHO, the feature made the syntax more consistent (as well as more "serious", comparing to the "old enemy" C++, or the new one, C# :-).

With VB.NET 2003, someone "clever" decided that default constructors should NOT retain empty parentheses. Period. Your only option is to turn off the pretty listing feature and do it manually (don't forget proper indentation, character casing...). Too bad!

Call me a stickler, but I'm really upset by this!

In addition, this makes me also upset while checking-in files to VSS and browsing the differences just to see that two thirds of the changes are just missing parentheses from the default constructors...

What about you? Do you use the pretty listing feature of the VB.NET code editor? Are you satisfied with it?

© Palo Mraz - Tuesday, January 20, 2004

 ©2003-2007 Palo Mraz. All Rights Reserved.   See my 'new browser window' policy