From: Alex Baretta <alex@barettadeit.com>
To: "Juancarlo Añez" <juanca@suigeneris.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Newbe question: Strings <-> char lists
Date: Thu, 10 Feb 2005 18:36:09 +0100 [thread overview]
Message-ID: <420B9B89.30209@barettadeit.com> (raw)
In-Reply-To: <200502101718.j1AHIKDu027223@concorde.inria.fr>
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/>
next prev parent reply other threads:[~2005-02-10 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 16:22 jabbr Paul Argentoff
2005-02-10 17:18 ` Newbe question: Strings <-> char lists Juancarlo Añez
2005-02-10 17:36 ` Alex Baretta [this message]
2005-02-10 19:19 ` [Caml-list] " Juancarlo Añez
2005-02-10 20:55 ` Marcin 'Qrczak' Kowalczyk
2005-02-10 17:48 ` Olivier Andrieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=420B9B89.30209@barettadeit.com \
--to=alex@barettadeit.com \
--cc=caml-list@inria.fr \
--cc=juanca@suigeneris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox