develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #119437] [EXPERIMENT] autoderef, the implicit deref in push REF and others

Thread Previous | Thread Next
Ricardo SIGNES
August 23, 2013 01:47
[perl #119437] [EXPERIMENT] autoderef, the implicit deref in push REF and others
Message ID:
# New Ticket Created by  Ricardo SIGNES 
# Please include the string:  [perl #119437]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Perl 5.14.0 introduced this behavior, described in perl5140delta as:

  Array and hash container functions accept references

  Warning: This feature is considered experimental, as the exact
  behaviour may change in a future version of Perl.

  All builtin functions that operate directly on array or hash containers
  now also accept unblessed hard references to arrays or hashes:


  This allows these builtin functions to act on long dereferencing chains
  or on the return value of subroutines without needing to wrap them in
  "@{}" or "%{}":

The behavior of autoderef changed between David Golden's original work and the
final shipped product.

Specific questions:

* do we revert the behavior changes, at least in some cases?
* do we add an 'experimental' warning for perl 5.20 if the experiment isn't
  "accepted" yet by then?
* does this feature stick around if postfix deref is added

On the third point, my current thought is that it seems like removing it just
because a maybe-better form came around is going to lead to the same kind of
groaning that we've gotten with the addition of warnings for ~~ in perl 5.18.0.
Is it worth that?  Current thoughts on *that*:  I really don't know.  It's not
like the feature will not be useful anyway...

Anyway, the general question is the same as any other [EXPERIMENT] ticket:

What are the criteria for accepting or rejecting this experiment?


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