3 ms·
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 appe
by ttoinou 1y 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
- SomeoneOnTheWeb 1y agoCan't you do the exact same in compiled languages e.g. C or Rust?
- shikon7 1y agoYou can, but allocating and deallocating is more tedious without a GC, and if you care about performance, you might want to have mutable strings.