Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: Initializations of named references with an empty string should trigger an error
On Thu, May 22, 2025 at 2:28 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> With my patch only the first command would remain valid. Here is an updated patch that includes doc changes.
I still object to this. It makes "typeset -n" magic with respect to
all other declarations and TYPESET_TO_UNSET. At the very least it
means you can create a parameter that appears set to ${+ref} and has
an empty string value, but you can't actually declare that same
parameter that way.
I also think (in this latest patch) that you've missed the point of
the V10private test that you changed, but haven't a chance to check
further.
> On Thu, May 22, 2025 at 6:36 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>>
>> I'll just remove the third line.
I was thinking more of providing examples that someone might see in
(other people's) code and wonder what they meant.
>> (Other identical commands would be
>> typeset"" -n"" pname= and typese"t" -"n" pname"=" for example, which I
>> think everyone will agree would be silly to list.)
They're not identical if you consider that typeset is a reserved word
and typese"t" etc. are just a builtin, but that wasn't ever the point.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author