AFAIK, Scala doesn’t allow mixing both left and right precedence in the same expression.
Regarding precedence, theoretically in dotty we have the @infix annotation meant for infix operations. So if **
isn’t marked as infix, then the user should invoke x.**(y)
, which will have the proper precedence.
In any case, IMO, the lack of dedicated symbol for exponentiation does not hold enough merit for language intervention, where a library can suffice.
2 Likes