On 9 Aug., 13:50, Kevin Wright <[email protected]> wrote: > There's no implicit conversion here > just a list, with a :: method, taking x as an argument
I'm sorry, I thought you were trying to make a point about the general case and how operator overloading is simple and intuitive in the general case. And if x and someList are just expressions we know nothing about except that someList denotes a List[_], then x :: someList and someList.::(x) are most definitely not equivalent. That is because Scala has a left-to-right order of evaluation just like Java. Most surprising to me and definitely unintuitive is that this does not hold for implicit conversions. Granted implicit conversions really should not have side effects and if they do one should certainly not be relying on their order, but it's a violation of the principle of least astonishment nonetheless. With kind regards Ben -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
