Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Pattern matching and strings (and a mini-bug in Scanf)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-04 (13:01)
From: Florian Douetteau <douet@c...>
Subject: Re: [Caml-list] Pattern matching and strings (and a mini-bug in Scanf)
On Wed, 2 Oct 2002, Luc Maranget wrote:

> > I realize this, but I also believe that pattern matching on
> > strings is something that would make string-processing code
> > much clearer and more concise. I don't mean that we have to
> Ok, but again, I object to adding just one special case,
> some uniform treatement is required here, and it looks difficult.

Regular expression types cannot be used with Ocaml's strings
since they are mutable; so that any Ocaml extension supporting regexp
types will have to,  either (or both):
  1) provide it's own immutable string type
  2) use trivial typechecking for regexp patterns on immutable strings

IMHO, regexp patterns on mutable strings could thus be supported
without fear of blocking any future extensions.

Anyway this is only a syntactic problem, already discussed on the
list (see


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: