On 10/30/21 11:02 AM, Oğuz wrote:
On Sat, Oct 30, 2021 at 4:50 PM Greg Wooledge <g...@wooledge.org> wrote:
As Chet said, it's counterintuitive. Most people don't expect function A
to be able to affect loops inside function B.
I do, and a subshell can prevent function A from affecting loops
inside function B. But that is not a real problem, you wouldn't call,
say `break 3', when you're only 2 loop levels deep in a function
unless you wanted to exit from the loop from within the function is
called after returning.
It's a violation of scope.
It's a violation of lexical scope, I'm asking why not implement
dynamic scope, what's wrong with it?
You might be interested in
https://www.austingroupbugs.net/view.php?id=842
There was a discussion on the austin-group mailing list back in 2016
accompanying this defect report.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/