views:

219

answers:

2

I like scala's propose of operator precedence but in some rare case unmodified rules may be inconvenient because you have restrictions in naming your methods. Is there in scala ways to define another rules for a class/file/etc? If not would it be resolved in future?

+5  A: 

There is no such ability and there is little likelihood of it being added in the forseeable future.

Randall Schulz
+9  A: 

Operator precedence fixed in the Scala Reference - 6.12.3 Infix Operations

(all letters)
|
^
&
< >
= !
:
+ -
* / %
(all other special characters)

and it's not very probable that it will change. It will probably create more problems than it fixes. If you're used the normal operator precedence changing it for one class will be quite confusing.

Thomas Jung