Match Expressions
19/30
Attributes: Use Cases
Null-safe Operator
Differences with
switch
:
•
It is an expression, so returns a value
•
match
does not do type-juggling
•
No automatic fall through
•
Exception if nothing matched