----- Original Message ----- > From: "Brian Goetz" <brian.go...@oracle.com> > To: "Remi Forax" <fo...@univ-mlv.fr> > Cc: "amber-spec-experts" <amber-spec-experts@openjdk.java.net> > Sent: Wednesday, March 2, 2022 9:11:58 PM > Subject: Re: [External] : Re: Primitive type patterns
> On 3/2/2022 2:36 PM, fo...@univ-mlv.fr wrote: > >> There are two ways to express "match non null Integer + unboxing", >> this one >> Integer value = ... >> switch(value) { >> case Integer(int i) -> ... >> } >> >> And we already agree that we want that syntax. > > Wait, what? The above is not yet on the table; we will have to wait for > deconstruction patterns on classes to be able to express that. When we > get there, we'll have a choice of whether we want to add a deconstructor > to the wrapper classes. (At which point, you might well say "we already > have a way to do that"...) It's a bad faith argument, we know since the beginning that we need deconstructors. Rémi