how-we-work
how-we-work copied to clipboard
Normative Conventions: pretend primitives aren't iterable
We discussed this in the June plenary while considering iterator helper follow-on proposals. While we didn't call for consensus on it, there were many voices in support of this and none opposed. I will propose we officially adopt it at an upcoming plenary.
I think we could probably get away with also changing Iterator.from to reject primitives.
Iterator.from is a coercion method, so its input type should be looser. We specifically discussed that exact question, including in plenary.
Possibly worth calling out that this applies to async-iterable-taking positions as well.
@syg I've added the enumeration of all positions where primitives are currently iterated. Please review.