I'm aware that the official scala style guide states for no-argument methods we should omit parenthesis when calling them if they have no side effects, so string.length instead of string.length(). The same would be for number.toChar instead of number.toChar() I assume.
When looking up the read methods in scala.io.StdIn._ many examples in tutorials seem to retain the parenthesis when invoking the read methods, e.g.
val x = readInt()
val y = readLine()
..even though they omit them on other examples as stated above. So I'm wondering if this is because these methods do indeed have side effects? I've seen a couple of examples of people just writing readInt, i.e. without parenthesis, so I want to know which is the correct style in this case.
Obviously, any method that works with input/output has side-effect as it changes the state of an external system and every time you call it the result is different.
Also, you can check how these methods are defined in Scala sources on github, and they all defined with parenthesis so I would insist you should you use parenthesis as well.
Methods like toChar
don't have side effects as they are not changing any state. And they are defined without parenthesis see Source of class Int