tadeuzagallo / verve-lang

A functional language for the working hacker
https://verve-lang.org
MIT License
346 stars 7 forks source link

Make `if`'s parenthesis optional #2

Closed tadeuzagallo closed 8 years ago

tadeuzagallo commented 8 years ago

Still to be considered, this could introduce a (not too hard to solve) ambiguity, e.g.

foo(a: (): Bool): Int {
  if a() {
    42
  } else {
    0
  }
}