[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [ID 20000111.008] use strict 'vars'



>Don't break anything, but possibly produce incorrect warnings. If new
>warnings are regarded as breakage, we're screwed. I know use strict
>'vars' currently produces errors, not warnings, but it's not a big leap
>to convert those to warnings for $a and $b only. Perhaps you wanted me
>to mention that detail.

If you suddenly produce a warning just because someone was using
$a and $b, you will be shot.  Not by me, but by millions of users.
But if you make it $some_idiotically_long_variable_a, then you won't
be shot by millions of users--because this time I'll be at the front
of the line.

If you dont' believe me, try it.  Here's an "I told you so" in 
advance.

>Correct me if I'm wrong, but I thought the oft-repeated bug report is
>"use strict doesn't work for $a and $b." 

"use strict" doesn't "work" for a lot of other variables, either,
like @F and $_ and @_ and %_ and $ARGV and @ENV and $. and $!, too.
The allegation that there wasn't enough code out there using $a and
$b for us to care about it got the answer it deserves.

The novice issue is a red herring, and the "all programs do work (or should
work) the same way" was so silly I burst out laughing.  I hope you
don't want me to answer that one, too.  The answer is self-evident.

>If use strict said clearly "$a
>is a special case, so this warning might be in error", you won't see the
>bug report any more. 

I do believe I suggested a documentation patch.

Finally, the notion that "using single-letter variable names is a
crime that carries its own punishment" is especially apt here.

You can't "outlaw globals".  That's not what use strict does, you know.

--tom


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]