develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24250] "return" required in some anonymous closures

Dave Mitchell
October 21, 2003 14:04
Re: [perl #24250] "return" required in some anonymous closures
Message ID:
On Tue, Oct 21, 2003 at 01:46:27PM -0700, Yitzchak Scott-Thoennes wrote:
> On Tue, Oct 21, 2003 at 09:34:24PM +0100, Dave Mitchell <> wrote:
> > In the medium-term, I want to remove the sub(){$x} feature from Perl,
> > and also make do it another way. Both are relatively easy to
> > do (although in the longer term there may be even cleverer ways of doing
> > it in that would be harder to do but more efficient).
> > However, in the short term (ie for 5.8.2), neither of these changes should
> > happen (I'm not even sure if they should happen in any 5.8.x release).
> Given that we have a report of the feature breaking code as of 5.8.0,
> it would be advisable to fix it in the end-of-yearish 5.8.x release.

Perhaps, but its been broken for 1.5 years befor anyone noticed. During
that time people may have added code that indadvertently uses the new
behaviour and so would break if reverted.

> > So the only real question for 5.8.2 is whether we want to add a
> > deprecation warning for the feature we added (undocumented) in 5.8.0
> > and which we intend to remove in 5.10.0 (conscensus permitting).
> The point of a warning seems more to me to be for when the coder didn't
> want a constant that for when he/she did.

i *think* that's what I was saying. Every time Perl does the strange
5.8.0-ish convertion to a constant, you would get the warning. Normal
closures would be silent.

In the 70's we wore flares because we didn't know any better.
What possible excuse does the current generation have? Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About