|
|
|
|
|
by blackoil
3314 days ago
|
|
and that's what I meant, when I said niche use cases. You can replace all operators with names and still have no difference. At some places code will be verbose, but on whole code will be more readable. Another example if you want is http://www.scala-lang.org/api/2.9.2/scala/sys/process/Proces.... All operators can be replaced by completely readable names like run, build, read, write. Scala on whole is optimized to have lesser no. of characters in code, in contrast to verbosity of Java. Case classes and lambdas are what good came out of it, I understood the concept and now I can use them. Operator overloading and Implicit are what move pendulum to other side, they are not some novel concept and make very readable code, unreadable. |
|
Concatenating to a list and pattern matching are extremely frequent operations in Scala. Some of the operators they use have been in use for decades in the languages that influenced Scala.
Like many features across many languages it can be taken too far at times and people that enjoy Scala talk about them all the time. That said, the similarities of your example to operators I use at the command line every day makes it nice to read for me.