Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The FCP for RFC 3513 completed on 2024-03-23 with a disposition to merge. Let's merge it.
- Loading branch information
The FCP for RFC 3513 completed on 2024-03-23 with a disposition to merge. Let's merge it.
bc01ed8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a pity that this needs two keywords. Given that this will be fairly rare, a little more cumbersome syntax like
yield in { … yield … }
should be tolerable.Or, if you go for postfix
yield { … expr.yield … }
.Functions have no ambuiguty
yield fn … { … expr.yield … }
.bc01ed8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, i expect it to be relatively common, e.g. in python generators are pretty commonly used, I expect Rust to be somewhat similar