> Actually, coming to think about it more, I don't think this is > always desirable. I kind of like errors and calls to exit to > just do a hard cold exit and not do any cleanup. Why? Well, > you never know how long flushing output ports will take, and, > if you insist on flushing them, the process can potentially > hang and there will be no way to exit without a "kill -9" from > outside the process. That's not nice.
I agree with Mike on this one. Buffering is a necessary evil and should be as transparent as possible. Programmers should have to flush explicitly only when they need the output to appear immediately. To avoid the problems you cite, you might consider setting the port to non-blocking with fcntl or the equivalent, then write the buffer and ignore any errors. Explicit closing is another necessary evil, similar to the explicit freeing of memory, and should also be automatic when possible. I also agree that these are "quality of implementation" issues and that the example in the report should not assume such niceties, but I think the example should close rather than flush the port. Kent _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
