user
08/09/2017, 2:38 PMRuckus
08/09/2017, 2:49 PMtahn
or is that a typo?elect
08/09/2017, 2:49 PMilya.gorbunov
08/09/2017, 4:22 PMpow
-- we had tried it and it turned out to be very error prone since infix fun has lower binding priority than binary operators.elect
08/09/2017, 4:35 PMilya.gorbunov
08/09/2017, 4:44 PMelect
08/10/2017, 10:37 AMpow
to be infixed.. may I open a call and see how much votes it gets?ilya.gorbunov
08/11/2017, 5:18 AMsome people expected@elect I don't think it's a matter of votes. While it seems to be a common intuition thatto be infixed.. may I open a call and see how much votes it gets?pow
pow
should be infix when it's the only function invoked, as soon as it comes in a more complex expression, like a pow 2 + b pow 2
all intuition breaks.
It is highly unlikely that we'll be changing the order of infix operators and infix functions to tailor that to this case.
What can be helpful here is the designated operator for the exponentiation with its own prioirity, like ^
or **
, but given how reluctantly new symbolic operators are introduced in Kotlin, I wouldn't count on that too.