Skip to content

A Better C (ABC); or what is left in C (language-wise) that Arrow does not yet implement #43

@mehcode

Description

@mehcode
Enumerations
enum Color { Red = 1, Blue, Green }
  • Explicit discriminator type ? — enum Color: int32 { ... }
  • Scope; is Red a name or must it be accessed via Color.Red ?
Switch / Match

From C this is the switch value { ... } statement.

match value {
  case 1 { do_1(); }
  case 2 { do_2(); }
  case 3 {
    do_3();
    do_31();
  }
  otherwise {
    do_else();
  }
}
  • How far do we go with case patterns?
  • otherwise, case _, _, else, or default for the "else" arm
  • General case syntax:
    • case pattern => { ... }
    • case pattern { ... }
    • pattern => { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions