Option Strict Still Disabled in Beta 2

I had really thought the VB team at Microsoft would do the right thing and turn on Option Strict by default with VS 2005, but in Beta 2 it is still disabled. This is one of the first things I change when I configure my VS options, so I was disappointed to find Option Strict set to Off when I checked.

I'm sure there's some (il)logic to this decision, but I mean, come on already. Option Strict is there to help ensure developers write safer code (from a type conversion point of view, not in a security sense), so why not have it enabled out of the box? Turning it on by default forces developers to think about specific situations for when they would want to turn it off. And getting developers to think about things like that is a good thing.

So here's hoping Option Strict is turned on by defalt when VS 2005 goes gold.

Print | posted on Sunday, April 24, 2005 5:11 PM

Feedback

# re: Option Strict Still Disabled in Beta 2

left by Alex Lowe at 4/24/2005 5:22 PM
Never happen. Did you miss that whole 'Please don't take my VB6 away' tornado of blog posts? It is all about interoperability and the experience of VB6 to .NETers.

# re: Option Strict Still Disabled in Beta 2

left by Dave at 4/24/2005 6:00 PM
Alex: You might be right, but maybe we'll see it turned on by default in Orcas, which is at least 3 years away. Maybe by that time most of the VB6 nonsense will have subsided.

# re: Option Strict Still Disabled in Beta 2

left by James Avery at 4/25/2005 5:47 AM
I have to agree with Alex. There are a ton of VB6 developers out there who do not want to write good code, and that is never going to change. There are alot of VB.NET "power users" who want Option Strict, etc... but you are not the majority. :)

-James

# re: Option Strict Still Disabled in Beta 2

left by Jeffrey Palermo at 4/25/2005 6:15 AM
I agree with James. There are too many developers (of all languages) who know enough to get something to work, and they don't want to put out the effort to learn and make themselves better. They are happy with their skill set. I guess you can't force them. If they are getting paid for doing it, how can you argue with that?

I'm a firm believer that you can't change behavioral problems with technology. You can't keep people from goofing off at work by blocking webmail or other web sites. You also can't force better code by turning Option Strict on. After all, we have an OO platform yet how many .Netters still haven't written any OO code? It's all procedural. Even some in my workgroup don't know OO. But you don't have to in order to make .Net apps.

I personally prefer C# (but I now VB as well), and no matter what options they enable by default, it won't change behavior.

MSDN may be a culprit for constantly pumping the drag-and-drop "coding" scenarios. If MSDN stopped that and started pumping good design instead of designer features, the problem may get better.

# re: Option Strict Still Disabled in Beta 2

left by standardsGeek at 4/27/2005 5:33 PM
Another reason to prefer c#.

# re: Option Strict Still Disabled in Beta 2

left by Don Demsak at 4/28/2005 7:20 AM
My solution is the turn the Option Explicit On for VS.Net and off for Express editions. I mean, come on, if you are a hobbyist programmer, cool, you can write like a hobbyist programmer. But if you write enterprise apps (which is what VS.Net is for) then you better get with the program, and write enterprise ready level code. You could always turn the option off if you want to write bad code, but make them work for it!

# re: Option Strict Still Disabled in Beta 2

left by Dave at 4/28/2005 8:59 AM
Don, I like that idea. Makes perfect sense to turn it on by default in VS.NET but leave it off for the Express editions. Nice call.

# Option Strict and Option Explicit in VB.NET 2005

left by Coding Horror at 8/8/2005 12:13 AM
I just noticed that Option Explicit is on by default for new VB solutions in Visual Studio .NET 2005: It's about damn time. There's nothing more vicious than making an innocent typo when referencing a variable and not knowing about...
Comments have been closed on this topic.