With type variables, the original type system can be augmented and become a polymorphic type system.
引入类型变量和相应的类型检查方法,就可以将其类型系统扩充为多态类型系统。
This type will be used later to dispatch polymorphic behavior.
稍后,我们将利用这种类型来分派多态行为。
Your code can be more polymorphic — everything that responds to a method can be treated as one type — so you can often express ideas much more concisely than you can in other languages.
您的代码可以更加具有多态性——任何对一种类型的方法有反应的对象都可以看作这种类型——所以通常可以比其他语言更精简地表达思想。
应用推荐