[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different procedures for different functions



Neil Van Dyke Wrote:	
>I would argue that Posix environment variables are not important enough that should claim the identifier "environ".

Aubrey Jaffer wrote:
> environ is a variable, not a function.  This means that the only
> practical semantics is that environ is shared among threads. 	

I understand.

Neil Van Dyke Wrote:	
>think that names that don't stomp on the term "environment" (nor "variable" nor "value") would be best.

These functions belong to "system" library on R6RS as I wrote on this SRFI.
I think we can use the term "environment".

By the way, I check other programing languages.

Perl: %ENV(Hash). $ENV{key}
Ruby: ENV(Object). Env[key] ENV.each {|e| }
Python: os.environ. os.environ[key]
PHP: $_ENV.
Java:System#getenv(key) and System#getenv().
C#: using System; Environment.GetEnvironmentVariable("key") and
Environment.GetEnvironmentVariables()

I think C#'s aproach is good and easy to understand.
So how about using following names.

R6RS library: system.
(getenv "key") behavior: (get-environment-variable "key").
(environ->alist) behavior: (get-environment-variables).

- These name have different name for different functions.
- They don't use posix prefix.
- They don't use variable name "environ".

--
Taro Minowa(Higepon)

http://www.monaos.org/
http://code.google.com/p/mosh-scheme/