Date: Fri, 18 Dec 1998 11:27:57 -0800 (PST)
From: Brian Rogoff <email@example.com>
Subject: Subsequence references or substrings in OCaml
I've been doing a lot of string processing lately and trying to determine
the correct "functional" approach to string processing. In SML '97 (hey,
you've got to look at the competition ;-) the Basis Library has a
signature SUBSTRING which has a substring type, whose values are just
triples (s,i,n) where i is the starting index and n the size of the string
s. It turns out that many algorithms are simplified by using this kind of
representation for strings.
It also turns out that similar string representations have been used
before; if you hop over to http://www.cs.cmu.edu/~wjh/papers/ you'll see
that "subsequence references" are pretty much the same thing.
Its simple enough to implement subsequence references as a user defined
type in OCaml, as I've done, but I am curious about whether anyone else
who has used similar libraries would find a built-in substring or
subsequence ref library useful.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:17 MET