Finally, when designing pattern matching statements, be wary of relying on a default case clause.
最后,当设计模式匹配指令时,对于默认case的依赖要小心。
The last case clause handles any other message instance, thereby functioning as the default case.
最后一个case处理所有其它任何类型的消息实例,作用和default(默认)case一样。
We can then use those values on the right-hand side of the case clause, as we have in the above example.
我们可以在case语句的右边使用这些值,正如我们在上面的例子里看到的。
应用推荐