Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Make $^V and "my" implicit

by ikegami (Patriarch)
on Feb 03, 2014 at 17:42 UTC ( [id://1073239]=note: print w/replies, xml ) Need Help??

in reply to Make $^V and "my" implicit

why do I have to type use 5.016; at the top of every script?

You don't. You only need to this if you want version 5.16 of the language. Having the features always on or on by default would break programs, which is the very reason they were made features you need to turn on.

If we've admonished for so many years to (almost) always use "my" variables for proper scoping surely it is now time to makey "my" implicit?

Because having you declare them finds spelling errors. This is the worse suggestion for a change in Perl I have ever heard.

(I'm assuming you're not suggesting that we'd no longer be able to declare them explicitly. That would be even worse.)

Replies are listed 'Best First'.
Re^2: Make $^V and "my" implicit
by gunzip (Pilgrim) on Feb 03, 2014 at 17:54 UTC
    See my reply to Corion above. I'm not against what "my" stands for. Just reserve its use for cases where it really makes a difference, ie. same variable name and type ($@% etc.) used in different scopes. Forget it for anything else.

      That doesn't address what I said at all. If declaring variables isn't always required, typos in variable names can't be found. This would be a major loss. As such, declaring variables is always required, always makes a difference.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-17 21:26 GMT
Find Nodes?
    Voting Booth?

    No recent polls found