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

Re: [perl #113554] my() with empty list causes weird error

Thread Previous | Thread Next
Ricardo Signes
July 5, 2012 20:35
Re: [perl #113554] my() with empty list causes weird error
Message ID:
* Ricardo Signes <> [2012-06-25T20:38:46]
> It seems open to change.  The question is: what's the cost, and what's the
> benefit?

I think the feature seems low in both cost and benefit, with the key difference
that once we allow "my();" we will be hard pressed to disallow it later, if we
realize we should, as we'll be breaking something.  I'm not entirely opposed to
breaking code at the edges of sanity, but it sounds like there's very little
practical argument to make this edge case permitted.  Allowing "my()" won't
really make it act like "normal" built-ins.  It will make it a little more like
one, but not enough to be worth even the relatively small risk of future

As for the "this was made legal in 1999, but failed because of a separate
issue," that may be the case, but I don't believe it was really done
deliberately.  I've reviewed the (quite enjoyable*) p5p archives from that
summer of 1999, and I don't think this particular change was even noticed.
Further, it was made as part of adding subroutine attributes, which are hardly
something we look back on as one of our best designs.

* I particularly enjoyed Tom's notes on Python at
  and then all the replies.


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