Re:JavaScript Pattern Matching Proposal
by masklinn on Wednesday April 25, 2018 @12:53PM
(#16923474)
> Pattern matching can be quite powerful, e.g. in C# (which I wish was more indepth / more featured, it still feels a bit immature :( )
C# doesn't really deserve the name of pattern matching, just a type-based switch (with guards), you can't match on values let alone destructure them.
> Ugh, how do you format code?
4 spaces indent.
```
```IN languages like F#, pattern matching can compile time check you have covered all bases as well.
e.g, this won't build
````
```As i haven't told it how to handle the V case for that discriminated union. So you get nice compile time checking.
Ugh, how do you format code?