Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-10-21 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls