Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String is a class but we treat it as immutable #1870

Open
marcusnaslund opened this issue Aug 11, 2016 · 0 comments
Open

String is a class but we treat it as immutable #1870

marcusnaslund opened this issue Aug 11, 2016 · 0 comments
Milestone

Comments

@marcusnaslund
Copy link
Contributor

marcusnaslund commented Aug 11, 2016

This is obviously a big language design choice, but as I see it, we should either

  1. make String a cover (would make for easier memory management, but probably break rock completely, and we would be back in Text territory...)

or

  1. leave it as a class but modify the methods on String to allow editing an existing String instance instead of creating a new one (easy, since the underlying CharBuffer already does this!). This also simplifies a lot of the memory management code around strings we have today.

(Indeed, this is a big question requiring discussion, and maybe one that will never be fixed.)

@marcusnaslund marcusnaslund added this to the Later milestone Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant