I did a bit of digging in the archives. I believe the original proposal for autoderef is this: perl #78656: Allow push/pop/keys/etc to act on references (this already contains a long discussion). The feature was introduced in v5.14 (documented as experimental, but standardized warnings for experimental features weren't added until later, Update: in v5.20).

This P5P thread appears to be one of the discussions about the problems with the feature: Bug in auto-dereferencing in 5.14? My understanding is that there were lots of small problems with it, some philosophical but several practical, that added up to this being a contentious feature. Just to pick out two examples, again just based on my understanding from skimming the discussions: First, given that each, keys, and values can operate on both hashes and arrays (since v5.12), what does $x autovivify to in my $x; keys $x;? Second, what about blessed references that overload their dereferencing operations?

Since part of the reasoning behind introducing autoderef was to make some expressions simpler (push @{$foo{bar}{quz}}, $x; became push $foo{bar}{quz}, $x;), i.e. getting rid of the need for circumfix @{} and %{} dereferencing, the Postfix Dereference Syntax that was first introduced in v5.20 took care of that particular point (push @{$foo{bar}{quz}}, $x; became push $foo{bar}{quz}->@*, $x;). It seems to me that the discussion then generally moved in the direction that the problematic autoderef could be removed in favor of postfix deref (e.g. perl #119437: autoderef, the implicit deref in push REF and others, the future of auto-deref), until that then happened in v5.24 together with postfix deref being taken out of experimental status as a replacement.

(Update: See also perlexperiment.)


In reply to Re^3: Experimental push on scalar now forbidden by haukex
in thread Experimental push on scalar now forbidden by gsd4me

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.