The case for no case

Kevin Bourrillion kevinb at
Fri Jun 5 02:20:22 UTC 2020

For what it's worth, I don't think that users want to discriminate finely
between different kinds of patterns. Some just happen to only match one

Even in the math world, when reading a proof by exhaustion, often the cases
are heterogeneous, and I don't think it really bothers anyone. You just
want to be able to see that everything is covered by the time you're done.

On Thu, Jun 4, 2020 at 5:14 PM John Rose <john.r.rose at> wrote:

> On Jun 4, 2020, at 2:17 AM, Remi Forax <forax at> wrote:
> One simple solution is to use different keyword for different kind of
> patterns,
> by example, "case" for a constant pattern, "instanceof" for the type
> pattern, "default" the default pattern, etc
> That strikes me as making the job of mechanical parsing easier, and the
> job of *reading* harder.
> You’d replace a uniform left column of case/case/case with a heterogeneous
> mix of keywords.
> And most of the time you wouldn’t care which is which.

Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list