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 XAA26499; Thu, 27 Feb 2003 23:25:05 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA26394 for ; Thu, 27 Feb 2003 23:25:04 +0100 (MET) Received: from hirsch.in-berlin.de (hirsch.in-berlin.de [192.109.42.6]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1RMP3H20565 for ; Thu, 27 Feb 2003 23:25:03 +0100 (MET) Received: from hirsch.in-berlin.de (localhost [127.0.0.1]) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id h1RMP3hu016838 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 27 Feb 2003 23:25:03 +0100 Received: from first.UUCP (uucp@localhost) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with UUCP id h1RMP2Au016831 for inria.fr!caml-list; Thu, 27 Feb 2003 23:25:02 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: inria.fr!caml-list Received: by first.in-berlin.de via sendmail from stdin id (Debian Smail3.2.0.114) Thu, 27 Feb 2003 23:31:56 +0100 (CET) From: oliver@first.in-berlin.de (Oliver Bandel) Date: Thu, 27 Feb 2003 23:31:56 +0100 To: caml-list@inria.fr Subject: [Caml-list] Strings as arrays or lists... Message-ID: <20030227223155.GA488@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, in Haskell, strings are lists of chars. In Ocaml, strings seem to be array-like, but it's not possible to apply Array-functions on Strings, but nevertheless, the char's of a string are used in a very similar way, as arrays. The indexing is done with .(idx) in the one case and with .[idx] in the other case. Well, when strings would be lists of chars, List-commands like List.map and List.filter could be used. This would be more FPL-like. (And more convenient and IMHO more consistently.) But even if only the imperative Array-access would be possible (instead of the FPL-like Lists), it would be more convenient then to have such a string-type, which can't be used with the many libraries. Any suggestions on that topic? Ciao, Oliver ------------------- 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