Scala's “postfix ops”
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've searched for a half-hour, and still cannot figure it out. In SIP: Modularizing Language Features there are a number of features which will require explicit "enabling" in Scala 2.10 ( import language.feature ). Amongst them there is postfixOps , to which I just cannot find a reference anywhere. What exactly does this feature allow? 回答1: It allows you to use operator syntax in postfix position. For example List(1,2,3) tail rather than List(1,2,3).tail In this harmless example it is not a problem, but it can lead to ambiguities. This will