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

Re: A solution to fix hidden references in reference chains



On Fri, Mar 27, 2026 at 5:50 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Here is an updated version, now built on top of workers/54261, and where I have added tests for the various corner cases.

A remark in passing ...

> +#define PM_UNSET       (1<<24) /* If PM_DECLARED is also present, parameter
> +                                 * has null value. Otherwise, parameter was
> +                                 * unset.
> +                                 */
>  #define PM_DEFAULTED (PM_DECLARED|PM_UNSET)

It's inaccurate to say the parameter has a null value.  There's no
such thing as a null value in shell.  That's why the following #define
calls it PM_DEFAULTED.  It means the parameter exists in a scope
(which, at least previous to this patch, also implied it has a known
type) but does not have a value (which is distinct from languages
where null/undef IS a value). This goes back to the discussion in
which PM_NULL was rejected, which as I previously said I don't want to
rehash.

I'm of two minds whether to try to fix the comment or just remove it.




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