Hacker News new | ask | show | jobs
by kjeetgill 1459 days ago
You're getting downvoted because the most well known duck-typed languages, and probably where people first learned the term from, are all examples of very dynamic languages like python, ruby, and even js.

I'm sure there are others but the main language anyone knows static duck-typing for is go. In go at least, the interfaces get checked against implementations based what instances are bound to what interface variables or parameters at compile time.

2 comments

Just to add more detail. SQLite was designed for Tcl interop. Its typing model reflects that.
TypeScript is another mainstream programming language that allows, or even encourages, static duck typing.