Second Draft: Coroutines
Quirin Schroll
qs.il.paperinik at gmail.com
Thu Jan 23 16:45:55 UTC 2025
On Monday, 13 January 2025 at 17:59:35 UTC, Atila Neves wrote:
> […]
> Why `@async return` instead of `yield`? Why have to add
> `@async` to the grammar if it looks like an attribute?
Agreed. My two cents: C# has `yield return` and `yield break`.
The funny thing is, if D were open to contextual keywords, we
could do the same. Then, `yield` wouldn’t even have to become a
keyword. Alternatively, use `yield_return` and `yield_break`,
which, yes, are valid identifiers, but have a near-zero
probability being present in existing D code.
If anything, the proper way to make `yield` into a keyword is
`__yield`, not `@yield`.
More information about the dip.development
mailing list