Structural typing like this is completely compatible with the concept of duck typing. Indeed, it's basically doing static checking of duck typing.