Perhaps this helps:
scala> val (x, y) = (1, 2)
x: Int = 1
y: Int = 2
scala> val (X, Y) = (1, 2)
<console>:7: error: not found: value X
val (X, Y) = (1, 2)
^
<console>:7: error: not found: value Y
val (X, Y) = (1, 2)
^
, , unicode , , , , "" " ", , .
:
val © = 1
val ® = 3
(1, 2) match {
case (©, ®) => "Both match"
case (_, ®) => "Second matches"
case (©, _) => "First matches"
case _ => "None match"
}
res0: java.lang.String = First matches