请输入您要查询的俚语:

 

俚语 duck typing
释义

duck typing

Programming stuff.
If that thing can be throw into your oven and taste like a roast duck or whatever, and it lucks has wings and legs and ankles, that is a duck.
duck typing focus on the acts or the method but don't care what this thing actually is.
Jack: look at that bird, it can swim, it has two wings, it must be a DUCK.
Ben: That is a goose. Nerd. Stop duck typing.

duck typing

In computer programming with object-oriented programming languages, duck typing is a layer of programming language and design rules on top of typing. Typing is concerned with assigning a type to any object. Duck typing is concerned with establishing the suitability of an object for some purpose. With normal typing, suitability is assumed to be determined by an object's type only. In duck typing, an object's suitability is determined by the presence of certain methods and properties (with appropriate meaning), rather than the actual type of the object.
When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. You are duck typing that bird :V
随便看

 

英语俚语辞典收录了3210630条英语俚语在线翻译词条,基本涵盖了全部常用英语俚语的翻译及用法,是英语学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/1/23 17:34:49