Re: Pattern Matching for switch (Second Preview)

2021-09-30 Thread Remi Forax
> From: "Brian Goetz" > To: "Gavin Bierman" > Cc: "amber-spec-experts" > Sent: Vendredi 1 Octobre 2021 00:25:26 > Subject: Re: Pattern Matching for switch (Second Preview) > [ moving to a-s-e ] > I get the concern that a type pattern is no longer "just a variable > declaration"; that was a nic

Re: Pattern Matching for switch (Second Preview)

2021-09-30 Thread Brian Goetz
[ moving to a-s-e ] I get the concern that a type pattern is no longer "just a variable declaration"; that was a nice part of the "patterns aren't really so hard to understand" story.  But I think the usability is likely to be not very good.  Take this example:     sealed interface Node { }