On Apr 4, 2008, at 5:34 AM, Michael Sperber wrote: > I probably wasn't clear: I assume you noticed the problem when running > the example on Ikarus, which, last time I looked, indeed didn't flush.
Don't assume. :-) I knew very well that Ikarus doesn't flush. I didn't need to try it to find out. I *almost* tried to write (flush-output-port (standard-output-port)) though! > I'll fix the example, but it's an easy mistake to make for a > programmer > (as I did), especially for one who starts out using an implementation > that does flush, and those programs, even though strictly not > portable, > will break needlessly. I understand what you're saying, but I'm not sure I fully agree. Beginners make such mistakes all the time. They may assume that syntax objects are lists (because some implementations do that), they may assume that numbers, booleans, and chars are comparable with eq? (because almost all implementations do that), or may make all sorts of incorrect assumptions that someday, under some still conforming implementation, will break. What can you do about it other than educate people to not rely on unspecified behavior? For example, if you ask me about the order in which Ikarus's map procedure applies the function to the arguments, I wouldn't be able to answer. I just don't know, don't care, and I always make sure to never write any code that relies on such things. It's just me maybe. > So I'm encouraging you (and other implementors) to auto-flush. 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. Sorry! :-) Aziz,,, _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
