Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Variable namespaces, goals for ZLE, etc.
- X-seq: zsh-workers 4085
- From: Zefram <zefram@xxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx (Bart Schaefer)
- Subject: Re: Variable namespaces, goals for ZLE, etc.
- Date: Wed, 10 Jun 1998 11:55:36 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <980609232639.ZM9523@xxxxxxxxxxxxxxxxxxxxxxx> from "Bart Schaefer" at Jun 9, 98 11:26:39 pm
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