Comment by ttoinou
3 days ago
But in the syntax of scripting language its very easy to create a new string from the old string, destroy old string, replace variable by new string. Which appears mutable from the point of view of the developer
3 days ago
But in the syntax of scripting language its very easy to create a new string from the old string, destroy old string, replace variable by new string. Which appears mutable from the point of view of the developer
Can't you do the exact same in compiled languages e.g. C or Rust?
You can, but allocating and deallocating is more tedious without a GC, and if you care about performance, you might want to have mutable strings.