Record pattern: matching an empty record

Remi Forax forax at univ-mlv.fr
Sun Mar 13 15:09:06 UTC 2022


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


More information about the amber-spec-observers mailing list