Jim McBeath: Scala Operator Cheat Sheet
Introduction Scala syntax allows method names to use special characters such as +, * and :, and to use them as infix operators, which effectively allows operator overloading as well as the creation of new operators. This can make code more concise, but can also make it difficult to figure out what a particular Scala operator does, because you can't effectively do a Google search for \: or ++ or ~ or :: or pretty much any Scala operator method name. To make it even more difficult, an implicit conversion may be applied to one of the operands, so the class providing the operator method may not be the same as the declared class of the operand in the source code. In order to simplify the task of finding Scala operators, I have collected the operator names from the standard Scala classes in this one place. When you are looking for an operator, you can just come to this page and search for the operator within this page using your browser's Find function.Read full article from Jim McBeath: Scala Operator Cheat Sheet
No comments:
Post a Comment