mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Create generalized-iteration.md
This commit is contained in:
parent
c572f6944f
commit
519b2a8a1a
1 changed files with 21 additions and 0 deletions
21
rfcs/generalized-iteration.md
Normal file
21
rfcs/generalized-iteration.md
Normal 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?
|
Loading…
Add table
Reference in a new issue