Re: Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Koert Kuipers
i find version 3 without the _ also more readable On Sun, Apr 17, 2016 at 3:02 AM, Mark Hamstra wrote: > I actually find my version of 3 more readable than the one with the `_`, > which looks too much like a partially applied function. It's a minor > issue, though. > >

Re: Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Mark Hamstra
I actually find my version of 3 more readable than the one with the `_`, which looks too much like a partially applied function. It's a minor issue, though. On Sat, Apr 16, 2016 at 11:56 PM, Hyukjin Kwon wrote: > Hi Mark, > > I know but that could harm readability. AFAIK,

Re: Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Hyukjin Kwon
Hi Mark, I know but that could harm readability. AFAIK, for this reason, that is not (or rarely) used in Spark. 2016-04-17 15:54 GMT+09:00 Mark Hamstra : > FWIW, 3 should work as just `.map(function)`. > > On Sat, Apr 16, 2016 at 11:48 PM, Reynold Xin

Re: Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Mark Hamstra
FWIW, 3 should work as just `.map(function)`. On Sat, Apr 16, 2016 at 11:48 PM, Reynold Xin wrote: > Hi Hyukjin, > > Thanks for asking. > > For 1 the change is almost always better. > > For 2 it depends on the context. In general if the type is not obvious, it > helps

Re: Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Reynold Xin
Hi Hyukjin, Thanks for asking. For 1 the change is almost always better. For 2 it depends on the context. In general if the type is not obvious, it helps readability to explicitly declare them. For 3 again it depends on context. So while it is a good idea to change 1 to reflect a more

Question about Scala style, explicit typing within transformation functions and anonymous val.

2016-04-17 Thread Hyukjin Kwon
Hi all, First of all, I am sorry that this is relatively trivial and too minor but I just want to be clear on this and careful for the more PRs in the future. Recently, I have submitted a PR (https://github.com/apache/spark/pull/12413) about Scala style and this was merged. In this PR, I changed