3 ms·
I have no idea what you just said. Given that we're talking about type checking in python, care to give an example of a weakness of type checking in python?
by Shish2k 12y ago
I have no idea what you just said. Given that we're talking about type checking in python, care to give an example of a weakness of type checking in python?
- klibertp 12y agoWe're even, because I don't know about what "weakness" you're talking and why the heck you're bringing Python into abstract discussion on static typing. Basically, my parent said that static typing can express many things that testing (which is not static, because it runs the code) can. This is true, but there are things you can't express in any of the commonly used[1] static type systems and I just gave an example of such thing. Other than this there's nothing wrong with static typing in general and I'd be happy if Python got some kind of (optional) static type system, maybe in the vein of Typed Clojure and Typed Racket or Erlang's Dialyzer. Still, static type systems are not silver bullets and have their drawbacks - and that's all I wanted to convey in my comment. Edit: [1] the type system feature which would let you encode the example contract I posted is called "dependent typing" and is available only in a very few languages.