Introduce an "ExpressibleByCase" protocol (to facilitate struct-based enums with payload)

Sure, by "disagreement over how enum payloads should work" I was thinking about various proposals to deal with if case let (caution: vulgar language). I don't have my finger on the Evolution pulse, though, so apologies if I mischaracterized the situation.

There are, specifically, two ends:

  1. Get at an enum payload with greater ease and flexibility than using a "switch" statement, or "if case let" statement. Afaic, let payload: (Int,Double) = mycase() would be a pretty welcome replacement.

  2. Permit each enum case to be compared with or without arguments. Eg:

.foo      ==  .foo(123) // true
.foo(123) ==  .foo(456) // true
.bar      ==  .foo(123) // false

.foo(123) === .foo(123) // true
.foo(123) === .foo(456) // false

I probably should have led with that information, hey? These two problems have been my top two annoyances in Swift for the longest time. Since I don't see existing Swift enums ever adopting these solutions to them (source-breaking, and perhaps just my impression, previous proposals seem not ot go anywhere), I figure maybe we could just go with the building blocks to let people build their own?