flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Saputra <henry.sapu...@gmail.com>
Subject Re: Code conventions in Scala
Date Mon, 27 Oct 2014 22:04:47 GMT
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 <till.rohrmann@gmail.com> 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 <sewen@apache.org> 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

Mime
View raw message