|Anonymous | Login | Signup for a new account||2017-11-24 15:58 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003544||OCaml||~DO NOT USE (was: OCaml general)||public||2005-03-17 03:15||2016-12-07 11:29|
|Target Version||Fixed in Version||4.02.0|
|Summary||0003544: immutable strings|
|Description||Full_Name: Oliver Bandel|
OS: Mac OS-X
Submission from: dialin-145-254-064-192.arcor-ip.net (220.127.116.11)
keyword "immutable" for saying OCaml that a string
is an immutable string, so changing it will be
As in a record it is possible to say that a value
is "mutable" (instead of immutable), so for strings
(but hopefully not only in records) it would be nice
to say "immutable" to get an immutable string.
(but if only possible (or consistent) to have such an
additional keyword in records (like "mutable" is there possible)
than having this possibility only inside of records ie better than
do not have that possibility at all.
but if one could say
let immutable x = "Hello World!"
x. <- 'x'
would result in an error message ("x is immutable")
than this would be very nice. :)
Best Regards to the OCamnl Team,
|Tags||No tags attached.|
Since 4.02 (August 2014), the option -safe-string makes string immutable, and there is a new "bytes" type (and a Bytes module in the standard library) for mutable sequences of bytes. Hopefully -safe-string will be made the default in some future version.
It was a good suggestion, but a few years too soon! (I think there was no technical change that made it possible since, it's more that it took a while to realize that it was enough of a pain to start the transition work.)
|2005-11-18 10:13||administrator||New Issue|
|2016-06-27 21:32||gasche||Note Added: 0016013|
|2016-06-27 21:32||gasche||Status||acknowledged => resolved|
|2016-06-27 21:32||gasche||Fixed in Version||=> 4.02.0|
|2016-06-27 21:32||gasche||Resolution||open => fixed|
|2016-06-27 21:32||gasche||Assigned To||=> gasche|
|2016-12-07 11:29||xleroy||Status||resolved => closed|
|2017-02-23 16:36||doligez||Category||OCaml general => -OCaml general|
|2017-03-03 17:55||doligez||Category||-OCaml general => -(deprecated) general|
|2017-03-03 18:01||doligez||Category||-(deprecated) general => ~deprecated (was: OCaml general)|
|2017-03-06 17:04||doligez||Category||~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)|
|Copyright © 2000 - 2011 MantisBT Group|