Search Results
7/17/2025, 7:44:05 AM
Rust proposal
https://github.com/rust-lang/rfcs/pull/3295
foo.bar().baz.match {
_ => {}
}
Scala optional dot
https://docs.scala-lang.org/scala3/book/control-structures.html#match-expressions-support-many-different-types-of-patterns
i match
case odd: Int if odd % 2 == 1 => "odd"
case even: Int if even % 2 == 0 => "even"
case _ => "not an integer"
match
case "even" => true
case _ => false
List(1, 2, 3)
.map(_ * 2)
.headOption
.match
case Some(value) => println(s"The head is: $value")
case None => println("The list is empty")
What is best, with or without dot?
https://github.com/rust-lang/rfcs/pull/3295
foo.bar().baz.match {
_ => {}
}
Scala optional dot
https://docs.scala-lang.org/scala3/book/control-structures.html#match-expressions-support-many-different-types-of-patterns
i match
case odd: Int if odd % 2 == 1 => "odd"
case even: Int if even % 2 == 0 => "even"
case _ => "not an integer"
match
case "even" => true
case _ => false
List(1, 2, 3)
.map(_ * 2)
.headOption
.match
case Some(value) => println(s"The head is: $value")
case None => println("The list is empty")
What is best, with or without dot?
Page 1