Arguably, the special case is the “variable pattern”, where the identifier is a “variable identifier” because it starts with a lower case. This is subtle:
case r =>
case r() =>
One alternative is to go the other way:
def f(x: Int) = 42 match { case x => } // test x.==
The binding syntax
def f(x: Int) = 42 match { case y @ _ => }
could be simplified to
def f(x: Int) = 42 match { case y@ => }
since the underscore can be inferred. Then at-sign seems to say, bind this y. The penalty here of the suffix at-sign is less than the two back-ticks currently incurred for stable identifier.
I hope they also allow omission of underscore in
def f(x: Int) = 42 match { case if x > 0 => }
I don’t know when I soured on underscore, but possibly when I started doing:
42 match {
case x if x >= 27 => false
case ____________ => true
}