Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-27 Thread forax
> From: "Brian Goetz" > To: "Remi Forax" > Cc: "amber-spec-experts" > Sent: Wednesday, January 26, 2022 3:30:45 PM > Subject: Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on > patterns in switch) > I don’t object to having

Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-26 Thread Brian Goetz
lv.fr> wrote: From: "Brian Goetz" mailto:brian.go...@oracle.com>> To: "Remi Forax" mailto:fo...@univ-mlv.fr>> Cc: "amber-spec-experts" mailto:amber-spec-experts@openjdk.java.net>> Sent: Wednesday, January 26, 2022 1:28:19 PM S

Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-26 Thread forax
> From: "Brian Goetz" > To: "Remi Forax" > Cc: "amber-spec-experts" > Sent: Wednesday, January 26, 2022 1:28:19 PM > Subject: Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on > patterns in switch) >> The instanceof exampl

Re: [External] : Re: Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-26 Thread Brian Goetz
The instanceof example is not a source backward compatible change, remember that instanceof is not a preview feature. I’m well aware, can you give an example where flow typing of *type variables only* might lead to incompatibility? (I’m aware that this is a possibility, but you’re stating it l

Re: Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-25 Thread Remi Forax
- Original Message - > From: "Brian Goetz" > To: "amber-spec-experts" > Sent: Tuesday, January 25, 2022 8:49:08 PM > Subject: Patterns and GADTs (was: Reviewing feedback on patterns in switch) >> 3. Type refinements for GADTs > > There ar

Patterns and GADTs (was: Reviewing feedback on patterns in switch)

2022-01-25 Thread Brian Goetz
> 3. Type refinements for GADTs There are a number of unsatisfying aspects to how we currently handle GADTs; specifically, we are missing the type refinement process outlined in "Simple unification-based type inference for GADTs” (SPJ et al, 2005). Here are some examples of where we fall down