[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A few random I/O proposals

   I think the former is probably a better idea, at least if there is
   only going to be one way in the standard for sending output to
   strings.  I can imagine a situation occuring where somebody might want
   to send output to two separate places at once, and
   with-output-to-string doesn't cover that.  At any rate, they're both
   better than the possibilities I mentioned.

I think I like the former better.

   Minor points: I would call make-string-output-port open-output-string
   instead, and string-output-port-content output-string-contents.
   Output-string-contents should work on a port that has been closed.  I
   wouldn't want to include the with-output-to-truncated-string, and
   would call string->input-port open-input-string instead.  Also is
   with-input-from-port a typo?  Whether or not it is, having a generic
   with-input-from-port (and with-output-to-port) might not be a bad idea
   - much better than having to add an extra pair of procedures for each
   new kind of port that a given implementation supports.

It was a typo, I meant with-input-from-string.  Of course, MIT Scheme
also has with-input-from-port and with-output-to-port.

These were proposed at one point, but shot down.  I don't quite
remember why.