Re:Pyre: Fast Type Checking for Python
by acdha on Saturday May 12, 2018 @08:04AM
(#17053647)
How about a type error, which what actually happens?
If you store typed data as generic strings, of course, it’ll work but no language has an AI which will prevent you from being lazy about that.
[ Parent
| on HN ]
Perhaps filepath was a bad example for Python, as it has assertions. Zenhack actually made the same point and explained it better than me. Your runtime assertions (what you call "strong dynamic types") are a feature of the libraries you are using and a few built-in primitives. Python does not really have any facilities to talk about types. Using strings as in my example, would be "weak typing" in your terminology, but as you said, this is possible in any language, even Haskell. Therefore I fail to see how strong/weak is a language property. We are therefore left with static and "dynamic types", which Robert Harper argues should be statically typed and statically unityped.