[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: low-hanging SRFI fruit (SRFI-98)
From: |
Neil Jerram |
Subject: |
Re: low-hanging SRFI fruit (SRFI-98) |
Date: |
Sat, 30 May 2009 23:11:30 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Julian Graham <address@hidden> writes:
>> Looks good to me, please go ahead.
>
> Find attached a patch that includes the implementation previously
> attached, plus unit tests and additions to the NEWS and modules.texi
> files.
>
>
> Regards,
> Julian
Hi Julian,
Thanks for doing this. The code and test all look fine to me; I just
have a few comments on the commit message and the documentation.
Am I correct in thinking that you can commit this yourself? - subject
to Savannah coming back up, of course. If so, please do that after
incorporating the following points.
> From a1e4bcb30b80199de6f2cd620d950d04e0734592 Mon Sep 17 00:00:00 2001
> From: Julian Graham <address@hidden(none)>
> Date: Thu, 28 May 2009 18:15:05 -0400
> Subject: [PATCH] Implementation of SRFI-98 (An interface to environment
> variables)
When you commit, the commit message should include ChangeLog-style
entries for the changes.
> ---
> NEWS | 1 +
> doc/ref/srfi-modules.texi | 19 +++++++++++++++++
> module/srfi/srfi-98.scm | 44
> +++++++++++++++++++++++++++++++++++++++++
> test-suite/tests/srfi-98.test | 38 +++++++++++++++++++++++++++++++++++
> 4 files changed, 102 insertions(+), 0 deletions(-)
> create mode 100644 module/srfi/srfi-98.scm
> create mode 100644 test-suite/tests/srfi-98.test
>
> diff --git a/NEWS b/NEWS
> index 1785fe8..94d6be7 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -10,6 +10,7 @@ Changes in 1.9.0:
> * New modules (see the manual for details)
>
> ** `(srfi srfi-18)', multithreading support
> +** `(srfi srfi-98)', an interface to environment variables
> ** The `(ice-9 i18n)' module provides internationalization support
>
> * Changes to the distribution
> diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
> index 1fa50b2..638aa46 100644
> --- a/doc/ref/srfi-modules.texi
> +++ b/doc/ref/srfi-modules.texi
> @@ -47,6 +47,7 @@ get the relevant SRFI documents from the SRFI home page
> * SRFI-61:: A more general `cond' clause
> * SRFI-69:: Basic hash tables.
> * SRFI-88:: Keyword objects.
> +* SRFI-98:: An interface to access environment variables.
That's not quite idiomatic English, is it? I know it's the title of
the SRFI, but I think that `Accessing environment variables' would be
simpler and better.
> @end menu
>
>
> @@ -3608,6 +3609,24 @@ Return the keyword object whose name is @var{str}.
> @end example
> @end deffn
>
> address@hidden SRFI-98
> address@hidden SRFI-98 An interface to access environment variables.
Same again here.
> address@hidden SRFI-98
> address@hidden environment variables
> +
> +This is a portable wrapper around Guile's built-in support for
> +interacting with the current environment, @xref{Runtime Environment}.
> +
> address@hidden {Scheme Procedure} get-environment-variable name
> +Returns the value of the named environment variable as a string, or
> address@hidden if the named environment variable is not found. This is
> +equivalent to @code{(getenv name)}.
Looking at this from the point of view of a developer wanting to use
this procedure... Should name be a symbol, or a string; or can it be
either?
> address@hidden deffn
> +
> address@hidden {Scheme Procedure} get-environment-variables
> +Returns names and values of all the environment variables as an
> +association list.
In which the keys and values are strings? Or are the keys symbols?
Regards,
Neil