in reply to Re^3: iis ftp redirection
in thread iis ftp redirection

"it was easy to divide a line between "stuff that was crap" and "stuff that we don't know about yet but might be crap or might be great stuff" by whether it used Option Declare."

"Implicit variable declaration can make writing scripts faster and easier; at the same time, however, it can lead to subtle errors that are difficult to diagnose and fix." Does this definition contradict your statement? (Surprising since it is on M$ TechNet).

Replies are listed 'Best First'.
Re^5: iis ftp redirection
by diotalevi (Canon) on Mar 24, 2006 at 00:51 UTC

    It's worth noting that one of the nicest, in a feel-good kind of way, improvement to my dev tool was when it could be configured to automatically insert Option Declare into everything it created. This prevented me from accidentally omitting it. Its when I'd forgotten to ensure that Option Declare was turned on that I'd just run across some bug allowed by the absence of the restriction. It's at those moments that I knew I had some pain ahead of me as I added Option Declare back in and went back to find the bugs that it had allowed to go undetected.

    So no. There's absolutely no good reason whatsoever to ever neglect to use Option Declare. There is occasionally a reason to revoke strict but you should never write a script without loading it. Heck, these days I've taught emacs to automatically syntax check my perl on save because that's also really valuable. The more checks that I get automatically, the better code I can write and the less time I have to spend fiddling with stupid plumbing that I've installed wrong.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Re^5: iis ftp redirection
by Tanktalus (Canon) on Mar 24, 2006 at 00:28 UTC

    Actually, in my experience, that definition contradicts itself. It's those subtle errors that are difficult to diagnose and fix that makes writing scripts slower and more tedious. Unless, I suppose, we use "M$"'s definition where writing does not include testing and fixing, nor does it imply writing correctly...