Re: [Discuss] Declare class field's type in scala class field

2017-01-27 Thread Jinkui Shi
Hi, Till, Bruno Thank for your reply. Twitter’s scala programming suggestion is useful. I prefer the alexandru/scala-best-practices. Like this rule `2.16. Public functions SHOULD have an explicit return type`, the class field type explicitly declaring is better for developer to read. [1] ht

Re: [Discuss] Declare class field's type in scala class field

2017-01-26 Thread Bruno Aranda
Hi, Twitter's Effective Scala contains very well-known and accepted conventions for Scala: http://twitter.github.io/effectivescala/ Cheers, Bruno On Thu, 26 Jan 2017 at 14:16 Till Rohrmann wrote: > Agreed. I think it's a good idea to annotate the code with as much > information as possible t

Re: [Discuss] Declare class field's type in scala class field

2017-01-26 Thread Till Rohrmann
Agreed. I think it's a good idea to annotate the code with as much information as possible to help other people to understand it. I think it's a good idea to include this information in the coding guidelines. But I'm not sure whether we have a dedicated Scala coding guideline. Cheers, Till On Thu

[Discuss] Declare class field's type in scala class field

2017-01-26 Thread Jinkui Shi
hi, all Scala can infer the actual type if we didn’t declare its type. There also nothing different in the byte code of java class format. It’s convenient for write the code, but hard to read. Maybe it’s time to face such bad smell code. Scala check style plugin also have such rule. We can add