← Back to Dev to English Dictionary
Duck Typing

Duck Typing - as interpreted by GPT-4 & DALL-E 3

Duck Typing

duhk typ-ing

Definition

In programming, focusing on what an object does rather than what it is, leading to moments where a cat could be mistaken for a duck if it quacks convincingly.

Etymology

From the phrase, 'If it looks like a duck and quacks like a duck, it's probably a duck.'

Usage Example

It’s duck typing; I don’t care if it’s a string or an int, as long as it dances the samba,' explained Sarah.