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

Re: More rabbit-holes with unset variables



On Thu, Nov 26, 2020 at 2:42 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> So the language you're quoting was rejected, though not for that
> specific reason.

Yes, but that's not what I asked.

I asked who objected to the specific behavior I quoted.

> In fact, unless the notion of typed variables (integer, array, etc.)
> is excluded, that language is ambiguous, because (as I've mentioned
> elsewhere) the behavior of an "unset" variable in other contexts (such
> as assignment) is that it takes on the attributes from the assignment;
> so a the only useful "declared but not set" variable is a simple
> scalar.

And by scalar I suppose you mean string.

Yes, I agree in the context of typed variables it's much more
debatable what the initial value should be.

Which is why since the start I only mentioned variables for which the
user didn't specify a type.

-- 
Felipe Contreras




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