News for hackers. Stuff that matters.
Re:Why type hinting sucks (/r/Python) by mjburgess on Sunday February 12, 2023 @05:58PM (#34768064)
I dont, but as far as practical compilation for python goes, i'm fairly happy with a type system that panics -- we dont need proofs, we need to model the underlying lang in a way 95% close to its actual semantics

For me, above, we can observe that all functions either return or implicitly return None. Therein lies a straightforward alg: are the types of all the returns consistent with the keys of the specified dict? etc. etc.

You may, for sure, need to run compile-time user-supplied fns to augemtn the type system. That's fine.

You can even, if needed, call run-time fns with generic args -- in order to determine their type.

"static" analysis need not presume the absense of a runtime.. only not a particular state of the runtime

There are no comments on this comment yet.