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

Hopefully final changes to SRFI-13

This page is part of the web mail archives of SRFI 13 from before July 7th, 2015. The new archives for SRFI 13 contain all messages, not just those from before July 7th, 2015.

I have incorporated the results of the last several months of discussion
on the SRFI-13 mailing list into a new draft of the SRFI. The new draft will
appear at
I assume Mike will email the mailing list when he has it installed there.

Here are the principle changes to the previous draft:

- SRFI-13 is now completely backwards-compatible with R5RS.

- STRING-UNFOLD & STRING-UNFOLD-RIGHT have been slightly generalised.

- I have added STRING-HASH and STRING-HASH-CI.

- I have carefully pinned down what these string operators do in a super-ASCII
  world, especially in Latin-1 & Unicode. A short summary of the high-level
  design decisions:

  + All routines are locale- and context-insensitive.
    Hence hash-tables, symbol tables, file-name directories, etc. won't
    have their invariants corrupted by a shift in locale.

    Locale- and context-sensitive "text" operations are important, and should
    be treated in another SRFI.

  + Case-mapping is restricted to 1-1 maps, and must be consistent with
    the Unicode 1-1 case maps. Same rationale as above.

  + Case-insensitive operations are carried out by case-folding strings with
        (char-downcase (char-upcase c))
    where these two operations are assumed to be consistent with the
    case-mapping definitions above.

  + String comparison is done code-point by code-point. 
    Same rationale as above.

I have cleaned up the text and expanded the rationale section.

Note that I have also brought the companion SRFI-14 (character sets) into
similar alignment with modern, super-ASCII considerations. You can check
out the latest draft at
A description of the super-ASCII issues in the SRFI-14 context and a summary
of the changes can be seen at

Dealing with super-ASCII issues has been a bear; I hope that the new design is
acceptable. I am grateful for the help and advice I got on these issues. If
there are no glaring problems, we can move forward and declare this SRFI

Comments welcome.