Skip to content

Rename the async iterable declaration to async_iterable to match the type name. #1504

@tabatkins

Description

@tabatkins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions