Michael Sperber scripsit: > Per Bothner <[EMAIL PROTECTED]> writes: > > > I guess in theory one might be able to wrap a transcoder around a > > custom binary port but that seems horribly wrong when there is no > > underlying byte stream. > > Why?
Because it presumes that the only sensible source of characters is either a string or a underlying source of bytes (and ditto for sinks). But this is not so. For example, I might have a (stateful) procedure that picks a random letter from a given text represented as a string. Surely it's more reasonable to wrap the procedure directly with make-custom-textual-input-port rather than following the above two-step procedure, with its conversion from characters to bytes to characters again? The same arguments apply for m-c-t-output-port and m-c-t-input/output-port, of course. I presume that vectors of characters should stand in for bytevectors in in the read! and write! procedures, though strings might be a workable alternative. -- John Cowan http://ccil.org/~cowan [EMAIL PROTECTED] 'My young friend, if you do not now, immediately and instantly, pull as hard as ever you can, it is my opinion that your acquaintance in the large-pattern leather ulster' (and by this he meant the Crocodile) 'will jerk you into yonder limpid stream before you can say Jack Robinson.' --the Bi-Coloured-Python-Rock-Snake _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
