News for hackers. Stuff that matters.
Re:Ty: A fast Python type checker and language server by Spivak on Thursday May 08, 2025 @04:48AM (#43924336)
This argument doesn't make a whole lot of sense because nothing about type annotations constrains Python code at all. In fact because they're designed to be introspectable they make Python even more dynamic and you can do even crazier stuff than you could before. Type checkers are working very hard to handle the weird code.

Pydantic being so fast because it's written in Rust is a good thing, you can do crazy dynamic (de-)serializations everywhere with very little performance penalty.

Re:Ty: A fast Python type checker and language server by maleldil on Thursday May 08, 2025 @01:37PM (#43928868)
> nothing about type annotations constrains Python code at all

Sorry, but this is just not true. Don't get me wrong, I write typed Python 99% of the time (pyright in strict mode, to be precise), but you can't type check every possible construct in the language. By choosing to write typed Python, you're limiting how much of the language you can use. I don't think that's a bad thing, but it can be a problem for untyped codebases trying to adopt typing.

Re:Ty: A fast Python type checker and language server by Sinidir on Thursday May 08, 2025 @02:39PM (#43929718)
It is literally true. You don't need to run a type checker.