Yes, that is correct. Scala has code style guide that is used and recommended in Scala based application. Here is the particular section about 0-arity method calls: http://docs.scala-lang.org/style/method-invocation.html
- Henry On Mon, Oct 27, 2014 at 1:10 PM, Till Rohrmann <[email protected]> wrote: > Hi, > > as far as I know, it is common to omit the parentheses if the method > has no side effects. If it is not pure, then one adds the parentheses. > > Greets, > > Till > > On Mon, Oct 27, 2014 at 9:04 PM, Stephan Ewen <[email protected]> wrote: >> Hi! >> >> I have a question about the code conventions in Scala, or more >> specifically, about methods without parenthesis. >> >> For example, the ExecutionEnvironment.getExecutionEnvironment takes no >> parenthesis, appearing that way like a member of the class, rather than a >> method. >> >> Is there some rule when to use methods/functions with parenthesis, and when >> without? >> >> Greetings, >> Stephan
