|more useful options
Re: Use Strict needed?by dimmesdale (Friar)
|on Aug 05, 2002 at 12:47 UTC
Well, let's say that you change the way that a certain function does something, however slightly. For our purposes, let's say that you change a certain data structure you use, altering its name so that it is more descriptive of the new data structure. Okay, so now you've got to go to every place it was listed and make the code accept the new structure.
... and if you're anything like me, in a large listing, there always seems to be something that you forget. a simple 'use strict' can take care of that in many places. For example, it might, for our example, tell us that we used an unititilized value at line xyz. Going to xyz we realize we need to change something.
Or you may realize something that might be wrong (or that could be improved) with your current implementation.
From my (exceedingly short, I admit) experience, use strict has saved me a lot of time.
I recommend (if this didn't convince you) doing a seach with terms strict, use strict, and/or strict.pm. You'll find quite a bit of good discussion about the issue.