For what it's worth: I really prefer the dot notation myself. Yeah
it's more Java-like and I think that's a good thing for clarity.

The style guide seems to in general discourage infix except for
symbolic operators, and also a special case of higher-order functions.
But the example they give seems to turn on an ambiguity introduced by
spaces, and nothing to do with infix. I'm confused. But I like dots.

http://docs.scala-lang.org/style/method-invocation.html

I don't know of any reason using dots would create a weird or subtle effect.

On Thu, Jun 19, 2014 at 6:03 PM, Pat Ferrel <[email protected]> wrote:
> I noticed that some of the Scala code is like this:
>
>       val columnIDs = interactions.map({ case (_, columnID) => 
> columnID}).distinct().collect()
>
> but as I read the Scala style guide it should use infix notation like this
>
>       val columnIDs = interactions map ({ case (_, columnID) => columnID}) 
> distinct() collect()
>
> It seems that the former style, familiar in Java, may have side effects in 
> Scala, but perhaps I’m missing some Scala subtlety? I appears that both work 
> correctly in some tests I did.
> http://docs.scala-lang.org/style/method-invocation.html#higherorder_functions
>
> Before changing all my code am I reading this correctly?
>
>
>

Reply via email to