3 ms·
> what's the type signature of `print()` then? Dynamic typing doesn't rule out polymorphism. void print(PyObject objects...) where `PyObject` is a base t
by anaerobicover 6y ago
> 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.
- solosoyokaze 6y agoI 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.
- dexterlemmer 6y agoI agree. But this particular example ironically has nothing to do with dynamic typing.