develooper Front page | perl.perl5.porters | Postings from June 2015

Re: for 5.24: the lexical topic

Thread Previous
From:
Zefram
Date:
June 2, 2015 10:27
Subject:
Re: for 5.24: the lexical topic
Message ID:
20150602102719.GJ23010@fysh.org
Ricardo Signes wrote:
>Do we have any ways forward on the design, or anything to do other than remove
>this behavior?

I think there's no way forward that looks at all similar to what we have.
Any lexical topic variable would at least have to be selected on a
per-construct basis: you can't have "my $_" causing grep and the like to
use a lexical topic.  A spearate "grep_lexical" operator should be fine,
but if we go that route we should consider forcing the lexical topic
variable to have a name other than "$_" to avoid the confusing shadowing.
Actual "my $_" should be no more valid than "my @_".

-zefram

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About