News for hackers. Stuff that matters.
Re:Why Is Swift's String API So Hard? by cballard on Friday November 06, 2015 @11:45AM (#10520376)
A solution to this would be to disallow mutable value types. Then, all methods would _have_ to return a new instance.

The compiler implementation could use mutability behind the scenes for efficiency, while the language exclusively allowed immutable values.

There are no comments on this comment yet.