Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 4924 days ago | link | parent

..why not just make it a binary operator..?

Hmm, you mean an infix operator, right? I'm not sure how to fit an infix operator into an otherwise prefix language. I'm sure lots of questions arise. Operator precedence, where the right-hand arg terminates. If there's a simple model that answers those questions well that would be great.



1 point by Pauan 4923 days ago | link

Yes. One potential solution is the curly infix system described here (scroll down a bit):

http://www.dwheeler.com/readable/sweet-expressions.html

Though that does add two extra characters:

  {x | y | z}

-----

1 point by akkartik 4923 days ago | link

Ah, I keep losing that page, thanks!

But for this particular case I'd rather just add an extra '|' and make it all prefix.

-----