3 ms·
I still use python type hints (and TypeScript) - and while they have benefits, I find that they fall short of something like Rust, Haskell, etc (because they ar
by shpongled 4y ago
I still use python type hints (and TypeScript) - and while they have benefits, I find that they fall short of something like Rust, Haskell, etc (because they are just that - hints). I don't have the surety that the types as annotated are the same as the types at runtime.
- mejutoco 4y agoJust to make it clear. If you use typeguard @typechecked annotations snd the type hint does not match reality at runtime it will blow up with an error telling you. The same, but at "lint time" (not runtime) will happen with mypy or pyright, although I am sure there are rough edges.