From: Martin Jambon <martin_jambon@emailuser.net>
To: Arthur Chargueraud <cours_caml@france-ioi.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Unexpected behaviour of strings initialized with quotes
Date: Wed, 23 Nov 2005 12:56:46 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.63.0511231229310.3572@munge> (raw)
In-Reply-To: <002601c5f017$7ba6cc10$e600a8c0@arthur>
On Wed, 23 Nov 2005, Arthur Chargueraud wrote:
> I am surprized by a difference of behaviour between the strings
> "bbbb" and (String.make 4 'b').
...
> This is not a real problem, since it is not usual to modify
> strings initialized with quotes, but I am just wandering
> about the reason of such a behaviour...
It's actually easier to write String.copy "abc" instead of "abc"
than:
let f =
let constant = "abc"
fun x ->
...
do_something_with constant
...
instead of:
let f x =
...
do_something_with "abc"
...
which happens all the time.
--
Martin Jambon, PhD
http://martin.jambon.free.fr
Store and share your bioinformatics tips at http://wikiomics.org
prev parent reply other threads:[~2005-11-23 20:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-23 10:20 Arthur Chargueraud
2005-11-23 20:56 ` Martin Jambon [this message]
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=Pine.LNX.4.63.0511231229310.3572@munge \
--to=martin_jambon@emailuser.net \
--cc=caml-list@yquem.inria.fr \
--cc=cours_caml@france-ioi.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;
as well as URLs for NNTP newsgroup(s).