Re: Coding style question (about extra anonymous closure within functional transformations)

2016-04-14 Thread Hyukjin Kwon
Yea I agree with you all. Just let you know, this was anyway fixed in https://github.com/apache/spark/commit/6fc3dc8839eaed673c64ec87af6dfe24f8cebe0c On 14 Apr 2016 5:13 p.m., "Takeshi Yamamuro" wrote: > > The latter is simpler and less-typing, I think. > How about

Re: Coding style question (about extra anonymous closure within functional transformations)

2016-04-14 Thread Takeshi Yamamuro
The latter is simpler and less-typing, I think. How about adding this as an example in these style guides? // maropu On Thu, Apr 14, 2016 at 4:35 PM, Mark Hamstra wrote: > I don't believe the Scala compiler understands the difference between your > two examples the

Re: Coding style question (about extra anonymous closure within functional transformations)

2016-04-14 Thread Mark Hamstra
I don't believe the Scala compiler understands the difference between your two examples the same way that you do. Looking at a few similar cases, I've only found the bytecode produced to be the same regardless of which style is used. On Wed, Apr 13, 2016 at 7:46 PM, Hyukjin Kwon

Re: Coding style question (about extra anonymous closure within functional transformations)

2016-04-13 Thread Reynold Xin
We prefer the latter. I don't think there are performance differences though. It depends on how big the change is -- massive style updates can make backports harder. On Wed, Apr 13, 2016 at 7:46 PM, Hyukjin Kwon wrote: > Hi all, > > I recently noticed that actually there

Coding style question (about extra anonymous closure within functional transformations)

2016-04-13 Thread Hyukjin Kwon
Hi all, I recently noticed that actually there are some usages of functional transformations (eg. map, foreach and etc.) with extra anonymous closure. For example, ...map(item => { ... }) which can be just simply as below: ...map { item => ... } I wrote a regex to find all of them and