Hacker News new | past | comments | ask | show | jobs | submit login

> what's the type signature of `print()` then?

Dynamic typing doesn't rule out polymorphism.

    void print(PyObject objects...)
where `PyObject` is a base type.

Additionally, you could perfectly well have constants, or require variables to have a fixed type, in a dynamic language. You would just pay a cost at runtime to check the type on assignment.




I would argue that you pay the cost at runtime but you also pay a cognitive overhead cost while writing in a dynamically typed language. Refactoring in particular is a lot more difficult.


I agree. But this particular example ironically has nothing to do with dynamic typing.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: