Hacker News new | ask | show | jobs
by randomdata 659 days ago
Go structs are nominally typed, so that is beyond the topic of structural/duck typing. Only the interface is structurally typed.

The difference between structural typing and duck typing is that one is evaluated at compile time, while the other at runtime. Typescript is erased before runtime, so it by itself does not exhibit duck typing features, although Javascript does.