[Patterns] Document on exhaustiveness, unconditionality and remainder

Jens Lideström jens.lidestrom at fripost.org
Sat May 27 15:54:40 UTC 2023


This is a very informative document!

I don't find any mention of when the null value is accepted by type patterns. I would expect that to be discussed in the section "Nested patterns". Since this depends on whether a pattern is unconditional maybe the document should say something about it?

/Jens Lideström


On 2023-05-23 23:16, Gavin Bierman wrote:
> [for some reason this didn’t get sent - retry]
> 
> Dear all,
> 
> We have had a number of questions about the design philosophy of the exhausstiveness checking in pattern switch. Brian and I have written a short note spelling out the connection between the properties of unconditionality, exhaustiveness and remainder.
> 
> We hope this helps,
> 
> Gavin & Brian
> 
> https://openjdk.org/projects/amber/design-notes/patterns/exhaustiveness <https://openjdk.org/projects/amber/design-notes/patterns/exhaustiveness>


More information about the amber-dev mailing list