reddit discussion on replacing Python in 0install

Adam D. Ruppe destructionator at gmail.com
Wed Jun 12 11:20:41 PDT 2013


Here's a radical thought: should stdout even be global?

With any other file, this wouldn't be an issue because File's 
dtor calls close() which (I'm pretty sure) flushes the file, and 
thus would detect the error at the latest, when it goes out of 
scope.

I think if stdout wasn't global, I'd be among those complaining 
about the code it breaks and the hassle it brings, but it seems 
to me that this is the real problem here. It doesn't go out of 
scope until the program is terminating.


More information about the Digitalmars-d mailing list