Skip to content

Ternary expression #10

@kms70847

Description

@kms70847

One of KS' goals is to make it possible to do anything with a single very large expression. So it would be nice to have a ternary expression so you don't have to use if statements.

Unclear what the syntax should be. Candidates:

  • a if b else c
  • b ? a : c
  • if(b){a}else{c}

If the final candidate is adopted, we need to decide how to handle inline if expressions that don't have an else block, and if expressions whose bodies contain more than one statement.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions