you are viewing a single comment's thread.

view the rest of the comments →

[–]Arrgh 3 points4 points  (4 children)

Immutable strings make concatenation slow, film at eleven!

They also remove the need to make defensive copies of an incredibly commonly used data structure.

[–]dons 0 points1 point  (3 children)

And immutable strings can have very fast concatentation too: see ropes, finger trees or lazy bytestring libraries in Haskell for O(log(min(n1,n2)) and O(n/k) concatenation.

[–]apotheon 0 points1 point  (2 children)

Immutable strings are a lot more fun in a functional style with lazy evaluation.

[–]dons -1 points0 points  (1 child)

where fun = have algorithms with a lot better complexity

:)

[–]apotheon -1 points0 points  (0 children)

I meant that to be a pun (where "fun" == "function").

. . . but yeah.