[phobos] getenv() and friends

Sean Kelly sean at invisibleduck.org
Tue Mar 16 10:18:10 PDT 2010


To make them more D-like, why not an AA style interface?

Sent from my iPhone

On Mar 16, 2010, at 7:24 AM, Lars Tandle Kyllingstad  
<lars at kyllingen.net> wrote:

> [This was the second part of my e-mail to Andrei.  I've had some  
> more time to think about it, so I've expanded my proposal.]
>
> Would anyone mind if I move getenv(), setenv(), and unsetenv() to  
> the std.system module?  It really doesn't make sense to have them in  
> std.process.  Also, setenv() and unsetenv() should be implemented  
> for Windows as well.
>
> Perhaps one could, at the same time, give them names that are less C- 
> ish? Suggestions:
>
> - getEnv(), setEnv(), unsetEnv()
> - getEnvironmentVar(), setEnvironmentVar(), unsetEnvironmentVar()
> - getEnvironmentVariable(), setEnvironmentVariable(),
>     unsetEnvironmentVariable()
>
> Finally, would it be useful to have a
>
>  string[string] getEnv();
>
> function that retrieves the entire environment and stores it in an  
> associative array?
>
> -Lars
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list