set-environment-variable Lassi Kortela 05 Dec 2019 00:18 UTC
Re: set-environment-variable John Cowan 05 Dec 2019 19:47 UTC
Re: set-environment-variable hga@xxxxxx 06 Dec 2019 00:28 UTC
Re: set-environment-variable Lassi Kortela 06 Dec 2019 09:55 UTC
Re: set-environment-variable John Cowan 06 Dec 2019 13:20 UTC
Re: set-environment-variable Lassi Kortela 06 Dec 2019 13:53 UTC
Re: set-environment-variable John Cowan 06 Dec 2019 17:51 UTC
Re: set-environment-variable Arthur A. Gleckler 06 Dec 2019 18:45 UTC
Re: set-environment-variable Lassi Kortela 06 Dec 2019 19:00 UTC
Re: set-environment-variable Lassi Kortela 06 Dec 2019 20:40 UTC
Re: set-environment-variable hga@xxxxxx 07 Dec 2019 15:06 UTC
Re: set-environment-variable Lassi Kortela 07 Dec 2019 16:14 UTC
Re: set-environment-variable Lassi Kortela 07 Dec 2019 16:23 UTC
Re: set-environment-variable hga@xxxxxx 07 Dec 2019 16:29 UTC
Re: set-environment-variable John Cowan 07 Dec 2019 17:31 UTC
Re: set-environment-variable Lassi Kortela 07 Dec 2019 20:12 UTC
Is set-environment-variable needed after all? Lassi Kortela 07 Dec 2019 20:15 UTC
Re: Is set-environment-variable needed after all? John Cowan 07 Dec 2019 21:12 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 08 Dec 2019 19:36 UTC
Re: Is set-environment-variable needed after all? hga@xxxxxx 08 Dec 2019 20:07 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 09 Dec 2019 11:00 UTC
Re: Is set-environment-variable needed after all? Duy Nguyen 09 Dec 2019 03:51 UTC
Re: Is set-environment-variable needed after all? John Cowan 09 Dec 2019 04:20 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 09 Dec 2019 10:38 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 09 Dec 2019 10:41 UTC
Re: Is set-environment-variable needed after all? Duy Nguyen 09 Dec 2019 10:45 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 09 Dec 2019 10:49 UTC
Re: Is set-environment-variable needed after all? John Cowan 09 Dec 2019 19:35 UTC
Re: Is set-environment-variable needed after all? Lassi Kortela 09 Dec 2019 19:45 UTC

Re: set-environment-variable Lassi Kortela 07 Dec 2019 16:23 UTC

>> an overwrite argument
>>
>> It is worthwhile to add this to the SRFI 170 API, as, say, an
>> optional argument, defaulting to overwrite?
>
> I've never seen anyone use it... People always want to overwrite the old value.
> Therefore I suggest leaving out the option from the Scheme API.

Another option would be something like:

(get-environment-variable name [default-value])
(update-environment-variable! name proc [default-value])

Where the signature of proc is

(lambda (old-value) ...) => new-value

and old-value is the old value of the envar (of default-value if the
envar is not yet defined).

If default-value is not given, it defaults to #f.

This is probably also overkill?