Version française
Home     About     Download     Resources     Contact us    
Browse thread
Not really a bug but...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Not really a bug but...

Any chance of changing the semantics of string literals so they aren't static?

# let f() = "a";;
val f : unit -> string = <fun>
# let s = f();;
val s : string = "a"
# s.[0] <- 'b';;
- : unit = ()
# f();;
- : string = "b"

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e