[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: It is possible to remove the readonly attribute from {BASH, SHELL}OP
From: |
Chet Ramey |
Subject: |
Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS |
Date: |
Fri, 23 Feb 2024 10:18:59 -0500 |
User-agent: |
Mozilla Thunderbird |
On 2/22/24 6:15 PM, Martin D Kealey wrote:
On Wed, 21 Feb 2024 at 08:09, Chet Ramey <chet.ramey@case.edu
<mailto:chet.ramey@case.edu>> wrote:
On 2/20/24 4:11 AM, Martin D Kealey wrote:
> Ideally each function invocation would have its own variable namespace,
> only using the global namespace as a fall-back, but that creates
> complications with exported variables, so let's take baby steps to
get there.
That doesn't work with dynamic scoping at all.
Yes, that's exactly the point, to /avoid/ dynamic scoping. I want the
equivalent of Perl's "my", rather than Perl's "local".
OK. Implementing static scoping for functions is not on my list.
Code that currently relies on dynamic scoping would continue to work, while
new code can avoid the craziness that comes from "everything is global,
even when we claim it's local" and "unset can even mess with the poor
protection afforded by 'local'".
Do you mean that unset can mark local variables at the same scope as unset,
that unset can remove local variables at a previous scope, or that unset in
a shell function can unset global variables?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Grisha Levit, 2024/02/13
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Chet Ramey, 2024/02/16
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Grisha Levit, 2024/02/16
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Martin D Kealey, 2024/02/20
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Koichi Murase, 2024/02/20
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Chet Ramey, 2024/02/20
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Martin D Kealey, 2024/02/22
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS,
Chet Ramey <=
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Robert Elz, 2024/02/23
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Chet Ramey, 2024/02/23
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Robert Elz, 2024/02/23
- Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS, Martin Kealey, 2024/02/25