[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Opening and closing files.
I think that the right solution here, regardless of whether or not
the Scheme I/O system grows out of its `toy' status, ...
I don't think that opening and closing of files can grow out of the
"toy" department without being replaced. This is from an article I
posted to comp.lang.scheme:
I have really had it with the NO TOKENS rule in scheme. Scm3c has:
input-port? output-port?
open-input-file open-output-file open-io-file
call-with-input-file call-with-output-file
close-input-port close-output-port
open-input-pipe open-output-pipe
close-pipe
If I were to fill out this chart with the obvious procedures I would
have 18 functions just for opening and closing files. I have not
created these out of idleness; I actually use them and the Scheme set
is not sufficient for my work. I want to add unbuffered versions as
well (open vs. fopen) which will result in a grand total of 36. Oh, I
almost forgot, on MSDOS machines (one of the platforms that scm3c runs
on) there is a difference between binary and text files. That will
bring it up to 72 PROCEDURES JUST FOR OPENING AND CLOSING FILES.
This situation is obviously untenable...