Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: More named reference weirdnesses
On Sun, May 4, 2025 at 9:19 AM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>>
> More worryingly I think that the underlying specification and design goals are inadequate. I think that we could adopt an alternate specification that is both simpler and more useful than the current one and which I think would also be easier to implement and would present less corner cases.
1) This was intended to work as nearly as possible to the way named
references work in ksh, not to represent some ideal implementation.
2) The constraints of dynamic scoping have to be observed -- that is,
a variable (even a named reference) declared in an outer scope has to
"work" when used in an inner scope, unless superseded by a local.
3) A consequence of the these two principles is that a "named
reference" is NOT a pointer to an object, it is a reference to a NAME.
4) That NAME also has to follow the constraints of dynamic scoping.
We already experimented some years ago with having named references be
actual object pointers, if that's what you're thinking. For practical
purposes it would require replacing the entire parameter table
implementation.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author