2 ms·
There is little difference between "structural typing" in go, where function signatures reference named and separately defined interfaces, and "static duck-typi
by edmccard 14y ago
There is little difference between "structural typing" in go, where function signatures reference named and separately defined interfaces, and "static duck-typing" in F#, where function signatures using constraints effectively define an anonymous interface right there in the signature.
In either case, type errors are detected at compile time. Some people prefer to use "structural typing" for both (maybe using "implicit structural typing" to describe what can be done in F#), and to use "duck typing" to describe languages without type-checking, where type errors only happen at run time.
But it's all just terminology.