Pattern Matching for instanceof (Preview 2)

forax at forax at
Thu Feb 6 23:08:24 UTC 2020

----- Mail original -----
> De: "Brian Goetz" <brian.goetz at>
> À: "Remi Forax" <forax at>
> Cc: "jan lahoda" <jan.lahoda at>, "amber-spec-experts" <amber-spec-experts at>
> Envoyé: Vendredi 7 Février 2020 00:00:40
> Objet: Re: Pattern Matching for instanceof (Preview 2)

>> var is not really any, it's an inferred type pattern.
>> '_' is any, no ?
> Conveniently, an inferred type pattern _is_ an any pattern.  (See the
> explanation in the recent discussion on nullity, where this fell out
> nicely.)   So semantically a var pattern is an any pattern. 

not if there are multiple de-constructors with the same arity, right ?

> Whether or not we want an explicit any pattern is a separate question.


More information about the amber-spec-experts mailing list