Version française
Home     About     Download     Resources     Contact us    
Browse thread
immutable Strings?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: immutable Strings?

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)