[gathering-options] Arrow symbol

Stephen Colebourne scolebourne at joda.org
Thu Jun 23 12:55:57 PDT 2011


Summary after 1 day of "gathering options":

(I've added more examples, using what I believe to be reasonable
variants of two syntax families, please don't argue too much based on
the rest of the syntax I used, just focus on the "arrow")
----------------------------------------
Standard single line examples:
Use ->
  {x -> x + 1}
  (x) -> {x + 1}

Use =>
  {x => x + 1}
  (x) => {x + 1}

Use :
  {x : x + 1}
  (x) : {x + 1}

Use |
  {x | x + 1}
  (x) | {x + 1}

----------------------------------------
Alternate single line examples:
Use ->
  { -> 42}
  {x -> {y -> x + y}}

  () -> {42}
  x -> {y -> {x + y}}
  x -> y -> x + y

Use =>
  { => 42}
  {x => {y => x + y}}

  () => {42}
  x => {y => {x + y}}
  x => y => x + y

Use :
  { : 42}
  {x : {y : x + y}}

  () : {42}
  x : {y : {x + y}}
  x : y : x + y

Use |
  { | 42}
  {x | {y | x + y}}

  () | {42}
  x | {y | {x + y}}
  x | y | x + y

----------------------------------------
Multi-line examples:
Use ->
  {x, y ->
    if (x > y) {
      return x;
    }
    return y;
  }

Use =>
  {x, y =>
    if (x > y) {
      return x;
    }
    return y;
  }

Use :
  {x, y :
    if (x > y) {
      return x;
    }
    return y;
  }

Use |
  {x, y |
    if (x > y) {
      return x;
    }
    return y;
  }

----------------------------------------
- This thread is for GATHERING OPTIONS, not voting or discussing.
- You should only suggest an option if you personally prefer it to the
-> or => symbol
- You MUST include the two (original) examples converted to use your
preferred symbol
- Suggesting a symbol does not imply that you want any syntax with an
arrow (ie. you can prefer strawman family, but suggest an arrow
symbol)
- Don't reply just to say "I don't want an arrow symbol"
- Don't reply to propose a syntax that is completely different to one
of the four syntax families

This is the *final call* for arrow proposals.

Stephen


More information about the lambda-dev mailing list