develooper Front page | perl.perl5.porters | Postings from July 2009

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
David E. Wheeler
July 10, 2009 16:36
Re: [PATCH] Remove implicit split to @_
Message ID:
On Jul 10, 2009, at 2:42 PM, Chip Salzenberg wrote:

>  1. split in scalar context no longer assigns to @_.
>      the syntax of split does not change, only its semantics.  <---  
> vital point
>  2. people write code in Perl 5.12 that depends on the new semantics
>  3. it's syntactically valid Perl 5.10, 5.8, 5.6.1, etc.
>  4. when fed to those older Perls, the code compiles, but runs  
> incorrectly
>  5. users feel they've been unfairly played
>  6. they're right

As someone who likes to develop on the latest stable Perl, and then  
test my code with older versions before I release on CPAN, I don't  
find this very compelling. I don't feel played. I feel like there was  
an improvement in 5.12, and I *can't believe* it wasn't there before,  
but at least it is now, thank god, and I can either require 5.12 or  
use some other syntax to get the behavior in order to be compatible.

We could also make the error message more useful in maint perls.



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About