> Historically environment variables cannot be deleted, only made empty.
> It's not a good idea to check for existence, check for it being
> non-empty instead.

Do not tell it me. There is an example: if PYTHONDUMPREFS variable is set for 
debug build of python, no matter whether or not it is empty, python will dump 
references.

There is a way to delete variables on most system. I would expect vim to 
support deleting them. Also what for there is working `exists('$VAR')` if it is 
supposed to be `empty('$VAR')`? The statement in the doc (“could also be done 
by comparing with an empty string”) is not true, there is a difference between 
existing and empty in exists() output.

> Note that Vim will consider a non-existing environment variable to be
> empty, it doesn't give an error for ":let s = $ASDFASDF".

Usually environment variables are for interprocess communication between parent 
and children processes. Vim being a child process of the vim is very uncommon. 
And `exists('$ASDFASDF')` does not tell 0 if environment variable exists, but 
is empty.

All languages I use except VimL allow deleting environment variables: 
os.environ behaves like real dict in python, same for perl $ENV, shells have 
`unset`.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui