4 ms·
> By contrast, duck-typing means that the intricacies of which exact type you are deserializing into is a lot less important in python. How do you explain the
by woeirua 4y ago
> By contrast, duck-typing means that the intricacies of which exact type you are deserializing into is a lot less important in python.
How do you explain the popularity of type hinting in Python then? Type hinting arose _because_ duck typing is horrible for large systems.
- mandevil 4y agoWell, the article is the author's attempt to answer that question. I'm not sure that it's convincing to me, but then again I have a preference for strongly-typed languages so I'm probably not the correct audience. I'm just trying to help someone else understand the author's argument, as I understand it.
- paganel 4y agoNot the OP but I explain it as former Java/C# programmers coming to Python for one reason or another. I’ve come to Python 20 years ago after a short stint with PHP and I don’t really care if the incoming stuff I have to handle is a list or a tuple (let’s say) as long as it quacks and walks like the proverbial duck. More generally, you could say Python the original language is the victim of its own success (the same goes for JavaScript in relation to TypeSctipt).