[m-rev.] diff: io.get_environment_var on java

Paul Bone pbone at csse.unimelb.edu.au
Thu Aug 13 14:19:28 AEST 2009


On Thu, Aug 13, 2009 at 11:27:42AM +1000, Peter Wang wrote:
> On 2009-08-13, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> > 
> > When you use 'command()' to run a sub command and wait for it in Java does it
> > support environment variables?  If so keeping a map of changed environment
> > variables can be used to override any set for sub-processes as well as any
> > retrieved by io.get_environment_var.
> 
> It's possible to do that but I'm not sure we should.

Without thinking about it too hard I can think of the following pros and cons.

Pros:
    + It means one can export environment variables to child processes.
    + set_environment_var has consistent behaviour across more backends.

Cons:
    + It's more work, if we get what we want with less work then that's easier.
    + If a programmer uses other foreign code to start child processes
      environment variable bindings won't be exported.  This may not be what
      programmers expect.

Why do you say we shouldn't do this?

Since there seems to be an even number of reasons both for and against I'm
happy with either option.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20090813/cfc3dd7b/attachment.sig>


More information about the reviews mailing list