|
|
|
|
|
by virtualwhys
3321 days ago
|
|
Not sure, all of the proposed syntax changes in Dotty require `case` in pattern matching blocks. With braces how would you parse this (contrived) example? foo match {
x: Bar =>
(y: Int) => x.num + y
x: Baz => ...
}
With significant whitespace the first block of indented code would mark a `case` pattern, with subsequent indents belonging to the matched pattern.With braces I suspect the `case`less version becomes more difficult to parse. Otherwise why require `case` in pattern matches? |
|