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

For each for strings #110

Open
annevk opened this issue Mar 28, 2017 · 4 comments
Open

For each for strings #110

annevk opened this issue Mar 28, 2017 · 4 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 28, 2017

URL could use this, to quote from the source:

<p>For each <var>codePoint</var> in <var>buffer</var>

How we're going to do this depends on the mutable/immutable conversation and whether strings are like lists or have their own list-like generic.

@domenic
Copy link
Member

domenic commented Mar 28, 2017

This is IMO a pretty good reason for basing strings on lists, even if that's a little strange otherwise.

@annevk
Copy link
Member Author

annevk commented Mar 28, 2017

I also just found replace on a byte sequence (although that could also end up being a string, if we do decoding earlier on).

@annevk
Copy link
Member Author

annevk commented Mar 28, 2017

But again, we should settle mutable/immutable first: #91.

@tabatkins
Copy link
Contributor

As I argue in https://www.xanthir.com/b4wJ1, strings shouldn't be iterable by default. Not all of the arguments there apply to Infra, but the second one (no right way to iterate a string) absolutely does.

I think it would be fine to define For each code point and For each code unit that works over strings, tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants