'I\'d rather debug myself and be better at coding for it, than let some pragma do it for me'
You remembered to backslash the single quote! You must be a master of minor details and you probably never make any typos or bugs. I wish all my coworkers were just like you!
Okay, but I have to do things in the real world. Have pity on me. :-)
"Then I had one too many programs crash from a typo in a variable in an if branch I hadn't tested, and saw the light." -- tilly
"All i know is every time ive turned strict on in my code . . ., ive found errors. and same for other peoples code . . ." -- demerphq
Trust me on this one. You only need to do two things to see the "light." Take a Perl program of more than a few hundred lines, maybe something that you have not touched for a year, and do this:
Did you try it? Did you find a couple of misspelled variable names? Are you suprised that you found any? If you didn't find any, now you are sure that the code is perfect.
The general consensus seems to be that without 'strict', you code badly. I don't agree.
Have you ever made a typo in your code? How can you be sure there are none?
most of my globals are probably unintentional
<rant>You'd feel more strongly about this after being forced to work on code that has only global variables, many of which are one letter long. And the code is broken into multiple files. Which all use package main. Thankfully Perl gives you a way to work around this with "my" and/or "local." But it's still bloody sick. Maybe you (not YOU, but the person who did it) know that $j is the filename for the currently selected input file, but nobody else knows that. . .</rant>
In reply to Re: Re: Re: to strict or not to strict
by bunnyman
in thread to strict or not to strict
by castaway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |