Skip to content

Comment on Toward Go 1.3parent

Comments

Dynamically-typed languages don't need generics just like they don't need interfaces. If everything is a duck and everything holds ducks, then you don't need generics.

The need for generics (or macro/template-based equivalents) naturally falls out of using a statically-typed language.

Disagree. Generics aren't just used to enable generic operations - they also provide clarity/documentation on what types are being passed around. As someone who spends a lot of time working on other people's (sometimes old and crufty) code, I find that invaluable.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.