Following from #1183 (comment)
Currently match patterns do not care about the order, as the patterns cannot be overlapping (aside from else
, which is currently defined as "all cases not mentioned in the match"), so pattern order is ignored in enum matches.
Conversely, pattern order is significant in value matches, where we go down the list of values, checking for equality.
The first one allows matches like
match foo {
else => x
A => y
}
to yield y for A, which is dissimilar to other languages.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too