It's not always easy to understand (from Odersky himself https://gist.github.com/odersky/6b7c0eb4731058803dfd#file-fo...):
def toVector: Vector[B] = fold(Vector[B]())(_ :+ _)(_ ++ _)
To a Scala veteran, I'm sure that's easy to understand; to someone who's been learning the language (like me) it looks like gibberish.
I've also had to write code like this:
client.post(args).mapTo[Response].map(r => (r.success, r.serverException, r.unhandledException) match {
case (Some(response), None, None) => response
case (None, Some(serverEx), None) => throw serverEx
case (None, None, Some(unhandledEx)) => throw unhandledEx
})
simply because of the underlying api that other co-workers have built. When it takes you longer than 30 seconds to explain how a piece of code works to others, something is wrong.
All that being said, I do like the language; just not the compile times. It's also pretty close to ruby (with which I'm most familiar):
ruby:
numbers = [1, 2, 3, 4, 5]
numbers.select { |n| n >= 4 }
# [4, 5]
Scala:
val numbers = List(1, 2, 3, 4, 5)
numbers.filter(n => n >= 4)
// List(4, 5)