In the context of programming languages, duck typing means that if an object responds to the methods of a type, then for all practical purposes, you can treat it like that type.
在编程语言的上下文中,ducktyping意味着如果一个对象对于某种类型的方法有反应,那么事实上就可以把它看作那种类型。
Programming languages with features like duck typing can improve flexibility and reduce repetition by forcing fewer type definitions and reducing code needed purely to support a compiler.
具备诸如ducktyping这类特性的编程语言,通过使用更少的类型定义、减少纯粹为了支持编译器所需要的代码数,能够提高灵活性和减少重复。
Structural Subtyping (duck typing) using type inference and anonymous types.
使用类型引用和匿名类型的结构子类型转化(动态类型)。
This gives the expressiveness of duck-typing with the safety of static type-checking.
这既给予了动态类型的表达能力又保留了静态类型检查的安全。
The teal, a type of duck, is the likeliest to defy the hunter, with the mallard not far behind.
有一种鸭子——水鸭,飞行速度最快,敢跟猎人叫板最可能令其无功而返,野鸭的排名紧随其后。
For his own meals, he likes to make it with duck-bone broth and naniwa noodles, a type of high-quality thinnish udon that has been handcrafted in Japan's Akita Prefecture for over 300 years.
而松崎自己则偏好鸭骨汤和“浪花”拉面,一种手工把乌冬切成细条做浇头的拉面,在日本秋田县有300年历史。
With pleasure. The main points are the quality of the duck chosen and the type of wood burned.
非常荣幸。要点就是所选鸭子的质量和炉内所烧木柴的类型。
From the outside, actors can all duck-type the same -- you're always just submitting messages to a mailbox after all.
从外部看,actors同样是多态的——你最终都会把消息提交给一个信箱。
The test mostly analyse the film mulching hill-drop planter from two aspects: One is mechanism of duck-mouth type punching-opener, One is analyse of metering device .
本文主要从两个方面对覆膜穴播机具进行分析:一是鸭嘴式成穴器的成穴机理;二是外槽轮式排种器的分析。
This type of suffering we can't chase away as we would chase off a pig, a dog, a duck or a chicken.
这种苦恼,我们无法像赶鸡鸭狗猪那样赶掉牠们;
Peking duck is the most excellent meat-type breed and plays the important role in meat-type duck breeding.
北京鸭是我国十分优秀的肉鸭品种,在世界肉鸭育种中占有举足轻重的地位。
Peking duck is the most excellent meat-type breed and plays the important role in meat-type duck breeding.
北京鸭是我国十分优秀的肉鸭品种,在世界肉鸭育种中占有举足轻重的地位。
应用推荐