In that case, i prefer the current semantics because it's the same if a pattern
is a top-level or not.
I wish people could keep these things straight. We’re not talking about
changing the semantics of how pattern matching works, which patterns match
what, what nesting means, etc. We’re
OK, I get your point now. Your concern is not about *inference*, but
specifically how *diamond* will snap to the bound when it infers a wildcard,
because `new` doesn’t allow wildcards. But we do something differently for
inferring type variables of generic methods (we’ll gladly infer a
> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Thursday, January 27, 2022 2:04:35 PM
> Subject: Re: [External] : Re: Diamond in type patterns (was: Reviewing
> feedback
> on patterns in switch)
>> It's more an engineering thing here, we have far more casts than
It's more an engineering thing here, we have far more casts than switch +
pattern in existing code, and given that we suppose (perhaps wrongly) that the
semantics of the inference is not exactly one already existing,
I’d like to drill into this supposition. My supposition (maybe wrong) is that
> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Wednesday, January 26, 2022 3:34:21 PM
> Subject: Re: [External] : Re: Diamond in type patterns (was: Reviewing
> feedback
> on patterns in switch)
>> I think we should figure out how it should work on cast and then
> From: "Brian Goetz"
> To: "Remi Forax"
> Cc: "Tagir Valeev" , "amber-spec-experts"
>
> Sent: Wednesday, January 26, 2022 3:08:39 PM
> Subject: Re: [External] : Re: Treatment of total patterns (was: Reviewing
> feedback on patterns in switch)
> I don’t think its helpful to try and reopen
> 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 something explicit in the code, but I do object to