• lysdexic@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    It’s very weird to me that Python, as an inherently untyped language

    I don’t think this is true. Python is dynamically typed, but types exist. More importantly, Python is the poster child of duck typing. What is duck typing if not a way to implicitly specify protocols? If you’re relying on protocols to work, why not have tests for it? If you want to test protocols, aren’t you actually doing type checks?

    If typing is a good thing,

    …which undoubtedly is.

    (…) why not make it an optional first-class part of the language?

    It already is, isn’t it?

    But some people already have Python code that does not do type checking. What would be the point of refusing to run that code?