From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA26740; Fri, 4 Oct 2002 15:01:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA26745 for ; Fri, 4 Oct 2002 15:01:49 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g94D1l519098 for ; Fri, 4 Oct 2002 15:01:48 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g94D1gB42734 for ; Fri, 4 Oct 2002 15:01:42 +0200 (CEST) Received: from localhost (douet@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id g94D1ddu008331 for ; Fri, 4 Oct 2002 15:01:39 +0200 (MET DST) Date: Fri, 4 Oct 2002 15:01:39 +0200 (MET DST) From: Florian Douetteau Reply-To: Florian Douetteau To: Ocaml Subject: Re: [Caml-list] Pattern matching and strings (and a mini-bug in Scanf) In-Reply-To: <200210021715.TAA0000003914@beaune.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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