Browse thread
Strings
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Harrison, John R <john.r.harrison@i...> |
| Subject: | RE: [Caml-list] Strings |
| I can agree with you on this argument, but a question still remains: | why should you ever do things like: | | > # s.[0] <- 'a';; The point is that it might not be your own code that does it, but a function written by someone else to which you innocently pass a string argument. You may think you're writing purely functional code, but unless you've checked all the other functions you're using that accept or return strings, who knows? Even if you aren't a doctrinaire functional programmer, the use of mutable strings as the default weakens the abstraction boundary provided by functions and procedures, and surely everyone agrees on the importance of that. John.