[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A few random I/O proposals
My functions return #f for failure. Despite dire warnings from
several people on comp.lang.scheme, I have NEVER been burnt by this
(and I make lots of mistakes).
I believe you since I have not been bitten myself on my own code
because I am compulsive about testing return values (in C). However,
I've had to debug and fix enough broken C/Unix software (which uses
this method) written by other people that I do not believe it is an
acceptable solution for any language, and certainly not for Scheme.
Most, if not all, Schemes signal error if a #f is passed instead of a
port, whereas C just goes crazy. Scheme's type system provides
detection of this error. That is why it is easier to find an unopened
port in Scheme than in C. Comparison with C is not very applicable
here.