dplassgit/d2lang

Add more operators

Opened this issue · 1 comments

Examples:

  • Spaceship: x <=> y result is <0 if x<y, 0 if x==y, >0 if x>y
  • Null-coalescing: x ?? y results in x if it is non-null, otherwise results in y
  • x?.field results in x.field if x is not-null, otherwise results in null
  • ^x : indexes the xth element counting from the end of an array or string, e.g., "hello"[^1] is "o". Similar to python negative indexes