Re:Why type hinting sucks (/r/Python)
by 2h on Saturday February 11, 2023 @06:56AM
(#34751563)
I dont like Dynamic type checking, and I dont like polymorphic code. it just smacks of programmers who dont want to think critically about the actual code that they are writing.
I know that being explicit is a pain, but the alternative is trying to essentially design a system that can read a programmers mind, which is impossible. Each person is going to have a different expectation of what ambiguous code should do. in the absence of explicit types, thats what you have, ambiguous code that the interpreter has to decide what to do with. better to just explicitly say, "int input, int output".
I know that being explicit is a pain, but the alternative is trying to essentially design a system that can read a programmers mind, which is impossible. Each person is going to have a different expectation of what ambiguous code should do. in the absence of explicit types, thats what you have, ambiguous code that the interpreter has to decide what to do with. better to just explicitly say, "int input, int output".