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

Re: Variable namespaces, goals for ZLE, etc.



Bart Schaefer wrote:
>
>} If we *don't* introduce a proper namespace scheme, I hate to think what
>} will happen when modules gain the ability to define special parameters.
>
>I don't expect it'd be any worse than the current situation with external
>programs having to come up with names for their environment variables.
>If you can explain why a namespace like "zsh." is better than a simple
>convention like "ZSH_", I'm willing to be persuaded.

The advantage of a "zsh." prefix is that *nothing* currently relies
on such a variable name existing or behaving in any particular manner,
whereas "ZSH_" names are defined by POSIX to have no special semantics.
I think it is reasonable for a script, for any shell, to be able to define
parameters with any name, including "_" characters, without having to
worry about whether (a future version of) the shell will attach unwanted
semantics to the variable name.  Of course, we can't do anything about
"PATH", etc., but we *can* get zsh-specific variables out of the way,
making zsh more reliably usable as a scripting language.

-zefram



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