go top

duck typing
[dʌk ˈtaɪpɪŋ]

  • 鸭子类型:一种编程概念,主要用于动态类型语言中。它关注对象的行为,而不是对象所属的具体类型。如果一个对象能够实现某种行为,那么它就被认为具有相应的类型,而不需要显式地声明类型。

英英释义

Duck typing

  • abstract: In computer programming with object-oriented programming languages, duck typing is a style of dynamic typing in which an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see history below), which may be phrased as follows:

以上来源于: WordNet

双语例句

  • Language soft interfaces and duck typing.

    语言接口鸭子类型

    youdao

  • It even honors duck typing, with static guarantees.

    甚至还使用了鸭子类型,保证静态安全。

    youdao

  • The caveats of duck typing in a static language.

    静态语言使用duck类型的限制。

    youdao

更多双语例句
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定