Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: All the way up or current scope



On Sun, May 18, 2025 at 2:32 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> [...] your implementation of assigning 1 or 0 to a
> new "upper" field and then later using (pm->level - pm->upper) in
> scope resolution is exactly equivalent to assigning (pm->base =
> pm->level - (1 or 0)) and then using pm->base directly

Revising this analysis/opinion somewhat:  The "upper" field isn't
strictly necessary because PM_UPPER can be checked at each point where
pm->upper would be used.

Nevertheless, the "base" field is available and can't otherwise be
"salvaged", so there's still not much reduction in complexity.




Messages sorted by: Reverse Date, Date, Thread, Author