The new std.process is ready for review

Jonathan M Davis jmdavisProg at gmx.com
Mon Feb 25 17:08:06 PST 2013


On Monday, February 25, 2013 21:21:53 Vladimir Panteleev wrote:
> On Monday, 25 February 2013 at 20:09:14 UTC, Lars T. Kyllingstad
> 
> wrote:
> > Exceptions are designed to handle exceptional cases. A missing
> > environment variable isn't exceptional, it is commonplace.
> 
> I disagree. I don't know your uses cases, but as far as I can
> see, if the program expects the variable to be present in the
> environment, then it is no different from a missing file which
> the program expects to be present, or malformed user input.

Agreed.

I would think that it would make sense for opIndex to throw, and get to return 
null. Unlike AAs, opIndex would throw an exception rather than an error, but I 
think that the situation is very similar to that of trying to open a file.

- Jonathan M Davis


More information about the Digitalmars-d mailing list