Browse thread
jabbr
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alex Baretta <alex@b...> |
| Subject: | Re: [Caml-list] Newbe question: Strings <-> char lists |
Juancarlo Añez wrote: > How does one convert a char list to a string? > > Why aren't functions for converting char lists to strings and back part of > the standard library. > > Haskell allows treating any string as a char list. I don't know what it does > behind the scenes, but it is mighty convenient. As far as I now, Haskell actually implements strings as lists of characters, which might or might not be a useful abstraction of a string, but it is definitely inconvenient from the standpoint of computational and memory complexity. This explains the design choices behind the Ocaml string type as well as why a mapping from strings to char lists is not "standard" in Ocaml. Alex -- ********************************************************************* http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. +39 02 370 111 55 fax. +39 02 370 111 54 Our technology: The Application System/Xcaml (AS/Xcaml) <http://www.asxcaml.org/> The FreerP Project <http://www.freerp.org/>