Create generalized-iteration.md

This commit is contained in:
Arseny Kapoulkine 2022-02-01 17:25:56 -08:00 committed by GitHub
parent c572f6944f
commit 519b2a8a1a
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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?