TropicSapling/triforce

Mixfix operators?

Opened this issue · 0 comments

http://agda.readthedocs.io/en/v2.5.3/language/mixfix-operators.html

Would allow you to make functions like:

if ... then {
  ...
} ... else {
  ...
} // This is all one function call

It also fixes the issue with not being able to override array access ([]) syntax currently. Perhaps the syntax would look like this?:

func (array arr)[(unsigned int index)] -> T {
  ...
}

I have considered this before, but is it actually possible to implement? Considering Agda has managed to implement it, perhaps it actually is possible in P+ as well?