Re:Interfaces Generally Belong with Users
by Too on Sunday November 24, 2019 @03:39AM
(#21619165)
Javascript (without typescript) also has duck typing. The difference with structural typing is that the interface is formalized and enforced compile time.
Python 3.7 added compile structural typing using what they call Protocols. It works very similar to typescript. See https://www.python.org/dev/peps/pep-0544/