The problem with VB.NET default instances

less than 1 minute read

Talking about the divergence between VB.NET and C# while considering their typical audiences is a common theme. The default instance support that provides singletons for common types is another example of this. In and of itself, I don’t have a problem with this direction. This is a perfect example of making the things that your customers want to do often much easier.

However, I worry about the effect of this on developers’ understanding of types. In the VB6 world, it was common to speak to people who didn’t understand the difference between a form type and the form itself because of the default instance. This blurring then made it difficult for them to apply their VB knowledge to producing classes in an OO fashion. I have a feeling that VB.NET default instances is going to cause the same problem again.

Updated: