I'm new to Scala and in the Programming Scala book from O'Reilly the authors show some code that instantiates a trait. Given that traits are somewhat analogous to interfaces in Java (although I know traits are implemented as classes in the byte code), what does it mean to instantiate a trait, and what would be an appropriate use case / design pattern for this?
E.g.:
scala> val x = new T1 with T2 { type z = String val v: z = "Z" }
x: java.lang.Object with T1 with T2{type z = String; def zv: this.z} = $anon$1@9d9347d