3 ms·
> performance in general. Really? Forcing you to copy whenever you want to modify gives you worse performance. > If strings weren't immutable, you'd have to c
by whyever 9y ago
> performance in general.
Really? Forcing you to copy whenever you want to modify gives you worse performance.
> If strings weren't immutable, you'd have to copy s to avoid changing / breaking it.
That seems like a disadvantage to me. With mutable strings, you have the option to modify it in place instead of being forced to copy.
- krzat 9y agoIdeally you have strings that can be both mutable and immutable based on context. C# is not that smart so they opted into the only other sane option.