Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Make $^V and "my" implicit

by ikegami (Pope)
on Feb 03, 2014 at 17:42 UTC ( #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 (Monk) 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
Node Status?
node history
Node Type: note [id://1073239]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2018-03-23 19:48 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (296 votes). Check out past polls.