Re:different procedures for different functions higepon (06 Jul 2008 09:51 UTC)
Re: different procedures for different functions Neil Van Dyke (06 Jul 2008 10:30 UTC)
Re: different procedures for different functions Alex Sandro Queiroz e Silva (07 Jul 2008 13:24 UTC)
Re: different procedures for different functions Neil Van Dyke (07 Jul 2008 15:15 UTC)
Re: different procedures for different functions Aubrey Jaffer (07 Jul 2008 16:45 UTC)
Re: different procedures for different functions higepon (08 Jul 2008 02:46 UTC)

Re: different procedures for different functions Neil Van Dyke 06 Jul 2008 10:29 UTC

higepon wrote at 07/06/2008 05:51 AM:
> How about following names?
> (getenv) and (environ)
>
>      or
>
> (getenv) and (environ->alist)
>

The difficulty I'm having with good names for these procedures is that
"environment" and "variable" both have special meaning in Scheme, and
indeed are central to it.

And, as a general language rather than a Unix scripting language, I
would argue that Posix environment variables are not important enough
that should claim the identifier "environ".

One reasonable concession to the scripting people, in my opinion, would
be to use "getenv" for the function of getting a particular environment
variable, and to have a more long-winded name for getting an alist of
all environment variables.

The extreme would be something like:

    get-host-process-environment-variable-value
    get-alist-of-host-process-environment-variable-names-and-values

Referring to Posix would disambiguate "environment", so we could do:

    posix-environment-value
    posix-environment-map

    posix-value
    posix-environment

Or, as long as we're saying "posix", we can just use the Posix names
(I'm not sure all these are strictly Posix):

    posix-getenv
    posix-environ
    posix-putenv
    posix-setenv
    posix-unsetenv

Some Scheme implementations or libraries might provide the full fleet of
Posix identifiers without qualifying their names with "posix-" or
"posix:", for use by people using Scheme for Unix systems programming or
shell scripting.  However, for the default names that we'd like Scheme
implementations and programmers to use, I think that names that don't
stomp on the term "environment" (nor "variable" nor "value") would be best.

--
http://www.neilvandyke.org/