Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

"Short-circuiting" feature #3

@littledan

Description

@littledan

In this proposal, as the explainer says,

a?.b.c().d   // undefined if a is null/undefined

The "short-circuiting" semantics received some criticism at the previous TC39 meeting where the proposal was discussed. A few committee members (including Waldemar Horwat) expressed a preference that this would throw (on the access to .c) to keep the semantics simple and more locally understandable, and refrain from changing .. The explainer talks about the "right hand side", but where does the right hand side end exactly?

If you don't plan to remove this feature, it would be useful to extend the explainer with some more motivating use cases.

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