Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Re: Re: Using "my" suppresses "Name used only once" warning?

by Biker (Priest)
on Feb 03, 2003 at 13:17 UTC ( #232223=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Using "my" suppresses "Name used only once" warning?
in thread Using "my" suppresses "Name used only once" warning?

Technically, you cannot check the run-time usage of your variables concerning strings/numbers in compile time (or before, using 'lint' or somesuch) with a garrantee of success, because you don't have any idea of what data your program will read in from external sources. (Keyboard, files, databases, etc.)

So even if your code compiles without any 'numeric/string warnings' it may still fail in runtime when handling unforeseen data.

I guess the reasoning goes something like: "Since we cannot garrantee a successful verification in compile time but the programmer must anyway do it in run-time when it's important, then le'ts be consistent and let the programmer do the verification whenever s/he thinks it is necessary."

Personally, I tend to agree.

Everything went worng, just as foreseen.

  • Comment on Re: Re: Re: Using "my" suppresses "Name used only once" warning?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://232223]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2016-10-23 14:31 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.