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

example suggestion: Avoiding splitting a Str into characters #141

Open
Anton-4 opened this issue Dec 30, 2023 · 0 comments
Open

example suggestion: Avoiding splitting a Str into characters #141

Anton-4 opened this issue Dec 30, 2023 · 0 comments

Comments

@Anton-4
Copy link
Collaborator

Anton-4 commented Dec 30, 2023

From the Roc Str reference:

If it seems like a good idea to split a string into "characters" (graphemes), you should definitely stop and reconsider whether this is really the best design. Almost always, doing this is some combination of more error-prone or slower (usually both) than doing something else that does not require taking graphemes into consideration.

It would be good to have several snippets that demonstrate this.

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