On 08/25/2009 12:49 PM, Thomas Lord wrote:
> On Tue, 2009-08-25 at 11:51 -0700, Per Bothner wrote:
>> A mutable fixed-size string has so few uses (I can't think of
>> any) that there is little point is providing it in a language.
>> The only use I can think of is to implement a variable-size
>> string! If there are any real use cases, they can use a vector.
>
> I offered two examples of use cases which I think point
> to a broad range of situations where fixed-length mutable
> strings are quite useful. I'm not sure why you are overlooking
> that.
Neither of these are appropriate for strings, IMO:
You should be using byte vectors instead.
A "device driver wants to accumulate characters in a string-like
buffer before passing them to a client program": A device driver
accumulates fixed-length bytes, not Unicode characters.
(Semi-related: A keyboard does not transmit characters, it
transmits key events, which are very different.)
When it comes to "A buffer of characters that is displayed
directly on a terminal" - I don't think such a thing exists
any more, and if it did it would neither use Unicode
nor be programmed in Scheme.
--
--Per Bothner
[email protected] http://per.bothner.com/
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss