andrewrk · GitHub

  • Replace a ?? b binary operator with a ifnull b. After this change, all control flow occurs with keywords only.
    • other suggestions instead of ifnull are welcome. ifnull is nice because it is 2 lowercase words squished together so nobody will miss the identifier name.
  • Remove ??x prefix operator. Replace it with x.?. After this change and Pointer Reform #770, this symmetry exists:
    • *T is used to make a pointer type, and x.* derefs
    • ?T is used to make a nullable type, and x.? de-nullifies
    • Both operations have assertions that are potentially unsafe - .* asserts the pointer is valid among other things and .? asserts the value is non-null.

Anecdotally, this will look a lot better syntactically, especially with C-translated code.

Read the original on github.com ↗