Category:Typing/Compatibility/Duck

From Rosetta Code
Typing/Compatibility/Duck is a programming language feature.

A typing scheme commonly used by dynamic languages.

If it walks like a duck and quacks like a duck, I would call it a duck.

For example, with structural typing a “get the x element of a structured type” operation will only apply to one type (or its subtypes), but with duck typing it will apply to any structured type that has such an element. It is common for duck-typed languages to use dynamic typing too.

Subcategories

This category has the following 13 subcategories, out of 13 total.