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

Another push on declarednull branch



On Wed, Dec 23, 2020 at 3:47 PM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> In my branch it's actually called PM_NULL because I think semantically
> makes more sense.

Note I'm not rejecting your diff, just fixing things I overlooked in my own.

I OR'd PM_UNSET into PM_DECLAREDNULL because I thought there would be
fewer (and/or less confusing) cases where PM_UNSET had to be ignored
than cases where both PM_UNSET and (new flag) had to be treated as
equivalent, but having found all (hopefully) of the former it's
probably a wash.  Maybe you can still generate a simpler patch.

Alternate names for PM_DECLARED would be welcome.  If I could turn
back time, I might use PM_NOTSET, and then PM_NULL ==
(PM_NOTSET|PM_UNSET).  In fact I already like that enough better that
I'd probably redo it that way before submitting a patch for master.

> I added a test that shows a discrepancy I found (${(t)var})

New push to declarednull branch (tip is now 20e4d07b0) fixes this.
Also added the test from Filipe's patch and another test for readonly
declarations.

Note that workers/47704 (POSIX "readonly -p") hasn't been
committed/pushed anywhere yet, and I don't think we discussed whether
that should do something to "typeset" in ksh emulation.

It may be several days before I can look at this again.




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