That’s right; with record patterns pattern matching can now initialise **zero or more** pattern variables (with type patterns it was always exactly one pattern variable to initialise).
Gavin > On 13 Mar 2022, at 15:09, Remi Forax <fo...@univ-mlv.fr> wrote: > > Hi all, > while writing the prototype of the runtime, > i found a case i think we never discuss, can we match an empty record ? > > record Empty() { } > > switch(object) { > case Empty() -> ... // no binding here > > I think the answer is yes because i don't see why we should do a special case > for that, but i may be wrong. > > Rémi