3 ms·
Aren't strings immutable in most languages? Like in javascript, String.slice() returns a copy, it does not mutate the original string. I don't disagree with yo
by kyllo 13y ago
Aren't strings immutable in most languages? Like in javascript, String.slice() returns a copy, it does not mutate the original string.
I don't disagree with you, but I don't see how it's a disastrous problem, either.
- WalterBright 13y agoIn D, which has ptr/length arrays, strings are immutable and sliceable without copying. This can make them very fast.