Skip to content

Ternary revisited #247

Closed
Closed
@annevk

Description

@annevk

#175 added a ternary construct, but we don't use it consistently. Some examples:

Let activationTarget be target, if isActivationEvent is true and target has activation behavior, and null otherwise.

To pop from a stack is to remove its last item and return it, if the stack is not empty, or to return nothing otherwise.

I created a Twitter poll to help https://twitter.com/annevk/status/1123219698198482944 but that didn't really get conclusive. There was some a suggestion of using neither "or" nor "and", but applying this doesn't work consistently. This maybe works:

Let activationTarget be target, if isActivationEvent is true and target has activation behavior, null otherwise.

This does not seem to work:

To pop from a stack is to remove its last item and return it, if the stack is not empty, to return nothing otherwise.

cc @othermaciej @gsnedders @padenot

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