Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16271

Re: Local variable names clash with global read-only variable names.

From worley@alum.mit.edu (Dale R. Worley)
Newsgroups gnu.bash.bug
Subject Re: Local variable names clash with global read-only variable names.
Date 2020-05-03 21:53 -0400
Message-ID <mailman.2026.1588557240.3066.bug-bash@gnu.org> (permalink)
References <20200501113700.GC17864@eeg.ccf.org> <87imhcbh3j.fsf@hobgoblin.ariadne.com>

Show all headers | View raw


Greg Wooledge <wooledg@eeg.ccf.org> writes:
> Perl is a programming language.  It makes sense that perl would evolve
> in a way that makes it more useful for writing programs.
>
> Bash, on the other hand, is first and foremost a *shell*.  It's designed
> to act as an interface for executing commands, either interactively, or
> in a script.  Its use as a programming language is a distant second goal.

Oh, yeah, I don't think it would be at all worth the trouble to
implement lexical scoping in bash.  My point was, that if you *don't*
implement lexical scoping, you're pretty much guaranteed to get the sort
of conflicts between purposes that the original message points out.  And
it seems that the best choice in that conflict is the current behavior.

Dale

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Local variable names clash with global read-only variable names. worley@alum.mit.edu (Dale R. Worley) - 2020-05-03 21:53 -0400

csiph-web