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

Scheme String Operations



We at Texas Instruments propose the following revisions to Chris Hanson's
preliminary report on Scheme string operations.  Our implementation has
already begun, so we would like to hear objections and other comments as
soon as possible.  Thanks!


1. Name changes

   For reasonable consistency with Common LISP, we propose the following
name changes:

      Preliminary report      Our proposal     Common LISP
      ==================      ============     ===========
	char-equal?		char=		char=
	char-equal-ci?		char-equal?	char-equal
        char-less?		char<		char<
        char-less-ci?		char-less?	char-lessp

        substring-equal?	substring=
        string-equal?		string=
        substring-equal-ci?	substring-equal?
        string-equal-ci?	string-equal?

        substring-less?		substring<
        string-less?		string<
        substring-less-ci?	substring-less?
        string-less-ci?		string-less?


2. Added features

   (CHAR? obj) is needed for argument checking, if nothing else.

   We agreed at the workshop to include SYMBOL->STRING and STRING->SYMBOL
as essential and STRING->UNINTERNED-SYMBOL as optional.


3. Changes

   CHAR-SET-MEMBER should take its arguments in the same order as MEMBER.


4. Essential features

   We are not sure how to separate ``essential'' from ``optional''
features, but will probably go with everything labeled ``minimal'' below.
Those labeled ``elective'' will be available but not part of the initial
load of the system.

Basic Character Operations

    minimal:   CHAR?, CHAR=, CHAR-EQUAL?, CHAR<, CHAR-LESS?,
               CHAR-UPCASE, CHAR-DOWNCASE
    elective:  CHAR-UPPER-CASE?, CHAR-LOWER-CASE?, CHAR-SET-MEMBER?

Basic String Operations

    minimal:   STRING?, STRING-LENGTH, STRING-REF, STRING-SET!,
               STRING->SYMBOL, STRING->UNINTERNED-SYMBOL, SYMBOL->STRING
    elective:  STRING-ALLOCATE

Standard Operations

    minimal:   MAKE-STRING, STRING-FILL!, STRING-NULL?, SUBSTRING,
               STRING-APPEND, STRING-COPY, STRING->LIST, LIST->STRING

Motion Primitives

    minimal:   SUBSTRING-FILL!, SUBSTRING-MOVE-RIGHT!, SUBSTRING-MOVE-LEFT!

Comparison Primitives

    minimal:   SUBSTRING=, STRING=, SUBSTRING-EQUAL?, STRING-EQUAL?,
               SUBSTRING<, STRING<, SUBSTRING-LESS?, STRING-LESS?

    elective:  SUBSTRING-MATCH-FORWARD,     STRING-MATCH-FORWARD,
               SUBSTRING-MATCH-FORWARD-CI,  STRING-MATCH-FORWARD-CI,
               SUBSTRING-MATCH-BACKWARD,    STRING-MATCH-BACKWARD,
               SUBSTRING-MATCH-BACKWARD-CI, STRING-MATCH-BACKWARD-CI

Character Search Primitives

    elective:  all

Case

    elective:  all

-- Regards,
   David Bartley
-------