diff --git a/rfcs/generalized-iteration.md b/rfcs/generalized-iteration.md new file mode 100644 index 00000000..6d14594f --- /dev/null +++ b/rfcs/generalized-iteration.md @@ -0,0 +1,21 @@ +# Generalized iteration + +## Summary + +Introduce support for iterating over tables without using `pairs`/`ipairs` as well as a generic customization point for iteration via `__iter` metamethod. + +## Motivation + +Why are we doing this? What use cases does it support? What is the expected outcome? + +## Design + +This is the bulk of the proposal. Explain the design in enough detail for somebody familiar with the language to understand, and include examples of how the feature is used. + +## Drawbacks + +Why should we *not* do this? + +## Alternatives + +What other designs have been considered? What is the impact of not doing this?