caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: immutable Strings?
Date: Sat, 12 Mar 2005 21:50:11 +0100	[thread overview]
Message-ID: <20050312205011.GA2244@first.in-berlin.de> (raw)


Hello,

for records it is possible to say "mutable" to change a normally
non mutable value into a mutable one.

It would be nice to have the possibility to turn on
immutability fpr strings with a keyword like "immutable"
or so.

So it could be forbidden to modify strings in cases,
where it makes sense; otherwise it must be provided
String.copy at a lot of cases in a program, that
want's to forbid modyfiing the original data.

And disallowing a modification is much stronger/more strict
than only allowing modyfiing a copy.
So, it would be nice to have such a feature in newer versions
of OCaml.

Ciao,
   Oliver

-- 
      "If you desire sanity in this embarassment,
        stuff not the ear of your mind with cotton"
                                         (David Torn) 


             reply	other threads:[~2005-03-13 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12 20:50 Oliver Bandel [this message]
2005-03-14 10:30 ` [Caml-list] " Pascal Zimmer
2005-03-14 10:41   ` Jon Harrop
2005-03-14 11:15     ` Pascal Zimmer
2005-03-14 12:57   ` Richard Jones
2005-03-14 13:01     ` Richard Jones
2005-03-15  2:13       ` Jacques Garrigue
2005-03-15  8:09         ` Oliver Bandel
2005-03-15  8:40     ` Oliver Bandel

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=20050312205011.GA2244@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.inria.fr \
    /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).