From 519b2a8a1ab1ffc9fc27fef091bfb88298cf070c Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 1 Feb 2022 17:25:56 -0800 Subject: [PATCH] Create generalized-iteration.md --- rfcs/generalized-iteration.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 rfcs/generalized-iteration.md 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?