Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Experimental push on scalar now forbiddenby stevieb (Canon) |
on May 21, 2017 at 19:09 UTC ( [id://1190811]=note: print w/replies, xml ) | Need Help?? |
There have to be discussions as to the reasoning (typically, an experiment (certain operations such as push, pop etc on a scalar is one such experiment that made it into 5.14) don't work out. The majority of the time, a failure is due to a possible interference with future design considerations. This particular experiment was removed from 5.23 (dev track for 5.24). In this case, I haven't found out the discussions regarding any debates on this particular topic, but per perlexperiment for 5.24.0, it's clear that this feature was dropped for the Postfix Dereference syntax. tybalt89 provided an example of that, here. Of course, you can and always have been able to use the "circumfix operator" to push to a reference... push @{ $href->{aref} }, ...; or just a straight-up deref push @$aref, ...;. update: I said above: "The majority of the time, a failure is due to a possible interference with future design considerations." That may have been inaccurate, as I don't have statistics on the matter. Perl devs are under the order of perlpolicy, where the number one rule is to do their best to honour backwards-compatibility. Some of the experiments get downthumbed or footshot because something comes up that breaks things that used to work, is considered a "feature", and still need to work. My use of "majority" was wrong, as I truly don't know. I do know that at least some get written off due to future considerations, but I also know that some die due to breaking past compat, even if they live for a while.
In Section
Seekers of Perl Wisdom
|
|