On 09/07/14 15:45, Meta wrote:
As far as I know, there's no reason we can't add pattern matching to switch or final switch or both. There's no ambiguity because right now it's not possible to switch on structs or classes. See Kenji's DIP32 for syntax for tuples that could be leveraged.
There's no reason why we can add a completely new construct for this either. But it's usually easier to get a new function into Phobos then changing the language.
-- /Jacob Carlborg
