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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
From:
David E. Wheeler
Date:
July 10, 2009 16:36
Subject:
Re: [PATCH] Remove implicit split to @_
Message ID:
2F75B849-7D53-4045-9853-906345BB6FC2@kineticode.com
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.

Best,

David

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About