-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
Extend for, loop, and while loops to allow them to return values other than ():
- add an optional else clause that is evaluated if the loop ended without using break;
- add an optional expression parameter to break expressions to break out of a loop with a value.
Proposed in #352
Some discussion of future-proofing is available in #955
Tachi107 and igotfr
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.