I saw the thread about dropped features and I was wondering if there have been any discussions about dropping infix functions. I think they make code ambiguous and harder to read and I don't see that they add very much to the language.
My experience of infix method calls in Scala and method calls without parentheses in Ruby is that you have to read the code much more carefully to figure out where the receiver, method and arguments are. Dots and parenthesis make it immediately obvious. Infix calls also make code look inconsistent. Why should there be one syntax for method calls with a single argument and a different syntax for all other method calls?
The biggest downside I can see to removing them is map literals. It won’t be possible to do this any more:
hashMap("a" to 1, "b" to 2)
But there are alternatives. Real map literals. Or overloaded functions for small numbers of args and builders when you have many args (like Google Guava's ImmutableMap). Or functions taking a variable number of tuples of #(key, value). Only joking ;)
I’m worried because it would be very hard to remove infix functions if they’re in version 1.0. But adding them later wouldn’t cause any problems if people decide they’re a good idea after all.