Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 http://caml.inria.fr/archives/200107/msg00187.html)

--
Florian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners