Elliding type in matching an Enum

I had a similar idea for eliding the name of enums, although there the main focus was on expressions rather than patterns. I see no reason why it can’t be extended to patterns as long as there is enough information available for type inferencer.

As @kornel noted, to avoid breaking existing code it would be necessary to use some sort of marker. I suggested _:: as a prefix, which is in line with the use of _ as a way to omit parts of a type.

1 Like