[r6rs-discuss] Re: [Formal] formal comment (ports, characters, strings, Unicode)

From: Abdulaziz Ghuloum <aghuloum>
Date: Tue Mar 20 03:34:45 2007

On Mar 20, 2007, at 1:34 AM, Per Bothner wrote:

> William D Clinger wrote:
>> I do think most implementors have enough brains to provide
>> efficient O(1) amortized time string-ref,
>
> Well, there may be constraints that complicate that. For example
> a Java-based implementation may want to use java.lang.String
> for immutable strings.

I think you're complaining more about the shortcomings and limitations
of the JVM; such complaints may be more appropriately addressed to the
JVM people. I don't see why the fact that one entity is stuck in a
platform with such severe limitations should affect everybody here.
You know there are tens of Scheme implementations running on many
different architectures with such varying native representations and
constraints that it's just impossible to make anybody happy (let alone
everybody).

Let me put it in another way. Would you have complained about the R6RS
draft had the JVM supported only UTF-32 in place of its UTF-16 encoding?

>> Conclusion: The R6RS should not mandate any particular
>> encoding or representation of strings.
>> The current draft doesn't.
> However, it seems to prohibit an implementation that is simple
> (the way a raw array is), space-efficient, and O(1) for
> string-ref/set! Pick any two.

As far as I can tell, there is no representation that has all three;
otherwise, we would've seen it everywhere and there wouldn't have been
any other logical choice. So why are we complaining about the draft
prohibiting the nonexistent?

Aziz,,,
Received on Tue Mar 20 2007 - 03:34:18 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC