Exhaustiveness Checking
The Cangjie compiler checks whether match expressions cover all possible cases. For enum types, all constructors must be listed; for open types like Int64, a wildcard _ or binding pattern is needed to handle remaining cases.
Exhaustiveness checking helps avoid missing edge cases. If a match is incomplete, the compiler will report an error, catching potential bugs at compile time. This is an important advantage of pattern matching over traditional switch.
For enum, after listing all constructors, no _ branch is needed because the compiler knows all cases are covered. But for integers, strings, and similar types where the value domain is open, _ must be used to close the match.
Try deleting case West on line 14 and observe the error message the compiler reports to understand how exhaustiveness checking works.