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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
July 10, 2009 08:47
Subject:
Re: [PATCH] Remove implicit split to @_
Message ID:
b77c1dce0907100847r46820029l22d6f6f4d95e8de7@mail.gmail.com
2009/7/10 Aristotle Pagaltzis <pagaltzis@gmx.de>:
> * Ben Morrow <ben@morrow.me.uk> [2009-07-10 17:25]:
>> One good reason might be: someone who writes something on 5.12,
>> and doesn't know the history of scalar split, will get a nasty
>> surprise when they run that code on <=5.10.
>
> The default could be to die in scalar context, and returning a
> count could require `use 5.011`.

I wouldn't favor shoving all possible incompatible behaviours in lexical hints.
Or keeping two versions of the split source code in Perl forever.
After all, split in scalar context will warn on <=5.10, and possibly
tests will fail, so we can suppose this kind of incompatible change is
reasonably safe. We're speaking about newly written code here, not old
code.

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