Re:Go is not an easy language
by solosoyokaze on Monday February 22, 2021 @01:10PM
(#26227964)
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.
Re:Go is not an easy language
by dexterlemmer on Friday March 05, 2021 @03:24AM
(#26354311)
I agree. But this particular example ironically has nothing to do with dynamic typing.
Dynamic typing doesn't rule out polymorphism.
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.