languages aren’t ‘duck typed’ duck typing is to do with protocols, duck typing can be used in a language that is even statically typed.
javascript has weak types meaning they can be coerced to other types, the confusion arises because by defining a protocol for type coercion you can get weak types from duck typing.
languages aren’t ‘duck typed’ duck typing is to do with protocols, duck typing can be used in a language that is even statically typed.
javascript has weak types meaning they can be coerced to other types, the confusion arises because by defining a protocol for type coercion you can get weak types from duck typing.