[whatwg/webidl] Rename the `async iterable` declaration to `async_iterable` to match the type name. (Issue #1504)

tabatkins created an issue (whatwg/webidl#1504)

### What is the issue with the Web IDL Standard?

Currently, you declare an interface to be an async iterable with an `async iterable<ValType>;` declaration, similar to the `iterable<ValType>;` declaration that marks it as a sync iterable. But when declaring a *variable type* for, say, an input argument, you write `async_iterable<ValType> myArg`, with an underscore. The latter was originally spelled the same way, as `async iterable<ValType>`, but was changed in #1490 for technical grammar reasons (it made the grammar no longer LL(1)).

Now, tho, that means authors have to keep two different spellings in their heads depending on where the term is used.  The *difference* in the spellings isn't *meaningful*, either - it was changed *solely* to satisfy a technical constraint in the grammar, not for consistency, understandability, or any other "human" constraint. We have to do this sometimes, but this means we're now left with a human-facing *inconsistency* instead.

If we are indeed stuck with the underscore in the type name, we should use it for the interface declaration as well, to keep things consistent.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1504
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1504@github.com>

Received on Monday, 14 July 2025 19:25:15 UTC