How to define “type disjunction” (union types)?

One way that has been suggested to deal with double definitions of overloaded methods is to replace overloading with pattern matching: object Bar { def foo(xs: Any*) = xs foreach { case _:String => println(“str”) case _:Int => println(“int”) case _ => throw new UglyRuntimeException() } } This approach requires that we surrender static type … Read more

Add JAR files to a Spark job – spark-submit

True… it has been discussed quite a lot. However, there is a lot of ambiguity and some of the answers provided … including duplicating JAR references in the jars/executor/driver configuration or options. The ambiguous and/or omitted details The following ambiguity, unclear, and/or omitted details should be clarified for each option: How ClassPath is affected Driver … Read more

What Scala web-frameworks are available? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done … Read more

What do

I can see in the API docs for Predef that they’re subclasses of a generic function type (From) => To, but that’s all it says. Um, what? Maybe there’s documentation somewhere, but search engines don’t handle “names” like “<:<” very well, so I haven’t been able to find it. Follow-up question: when should I use … Read more