First, it is better to think of toLong and toString as methods of the Int class, rather than postfix operators. Integer literals are objects in Scala and therefore have methods, two of which are toLong and toString . (Admittedly, the situation is a bit more complicated with Int due to implicit conversions, etc., but this is a good way to think of it as a newbie.)
So what are the rules for releasing parentheses? Scala syntax allows you to drop () if the method does not accept any arguments. However, if the method is defined without parentheses, then they are not allowed at all:
class A() { def stuff() = "stuff" def things = "things" } val a = new A() a.stuff
Finally, when do you drop parentheses and when do you save them? By convention, in Scala we drop parentheses for methods that do not have side effects and retain them when there are side effects. Obviously, this is just a style, but it gives an additional key to readers about how your code works.
source share