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

Re: Bug with unset variables



Felipe Contreras wrote on Wed, Nov 25, 2020 at 02:46:40 -0600:
> Maybe there's a better way to describe this fact. Maybe Git's notion
> of logically separate changes [1] helps (e.g. you should not mix
> whitespace cleanups with functional changes). But the fact is that in
> virtually all languages (and bash and ksh) there's an idiom to declare
> a local variable and *only* declare a local variable (not do anything
> else).
> 
> Can we at least agree on that? In zsh typeset does *two* things.

I'd rather say that «typeset» does one thing — it ${verb}s a variable
(for some value of $verb) — and the zsh data model doesn't feature
a "Not really a value" value, so the variable necessarily gets _some_
value, like «int foo;» in C.




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