develooper Front page | perl.perl5.porters | Postings from April 2018

Re: [perl #133109] push on scalar forbidden: why?

Thread Previous | Thread Next
Dave Mitchell
April 22, 2018 18:16
Re: [perl #133109] push on scalar forbidden: why?
Message ID:
On Sat, Apr 21, 2018 at 07:56:48PM -0700, L A Walsh wrote:
> No algorithm will work for all input.  That doesn't mean you throw out
> division because you can't divide by 0.

The big difference between the two is that there's (in general) no
practical alternative to using division, while the auto-deref form can be
avoided by the trivial syntactical addition of a '@' or '%' to the source
code, plus possibly {} for precedence issues. Or use the recent posfix

So there's a very modest gain for allowing push $r, while there are many
drawbacks, requiring documentation for all the special cases, and those
special cases limiting the usefulness of the feature (like breaking

This feature, and its removal, has already been extensively discussed;
it's problematical, and its not going to be re-added.

Art is anything that has a label (especially if the label is "untitled 1")

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