unchecked

Scala pattern matching confusion with Option[Any]

I have the following Scala code. import scala.actors.Actor object Alice extends Actor { this.start def act{ loop{ react { case "Hello" => sender ! "Hi" case i:Int => sender ! 0 } } } } object Test { def test = { (Alice !? (100, "Hello")) match { case i:Some[Int] => println ("Int rec...

Name for a specific raw type/unchecked cast combo in Java generics usage

Effective Java 2nd Edition says that we should not use raw types in new code, and we must also try to eliminate all unchecked casts warnings, and to prove and document its safety if we choose to suppress such a warning. However, I've repeatedly seen a particular usage that combines raw types and unchecked casts in a type-safe manner. In...