News for hackers. Stuff that matters.
Re:Pyrefly: A new type checker and IDE experience for Python by tasn on Saturday May 17, 2025 @10:52AM (#44014746)
1. Maybe it's time to drop the crazy runtime generation and have something statically discoverable, or at least a way to annotate the typing statically.

2. Astral indicated already they plan to just add direct support for Django and other popular languages.

3. As people replied to similar comments on the previous threads (maybe to you?): that's not why ty is fast and why mypy is slow. It's also an easy claim to disprove: run both without plugins and you'll see ty is still 100x+ faster.

Re:Pyrefly: A new type checker and IDE experience for Python by WhyNotHugo on Saturday May 17, 2025 @11:44AM (#44015097)
> 1. Maybe it's time to drop the crazy runtime generation and have something statically discoverable, or at least a way to annotate the typing statically.

That, and duck typing, are one of the biggest things that make Python what it is. If I have to drop all that for type checking and rewrite my code, why would I rewrite it in Python?

Re:Pyrefly: A new type checker and IDE experience for Python by dontlaugh on Saturday May 17, 2025 @11:54AM (#44015177)
Having used Python for many years, it’s the least interesting aspect of the language. Almost all such tricks can be done with compile time meta programming, often even without API changes.
Re:Pyrefly: A new type checker and IDE experience for Python by mixmastamyk on Saturday May 17, 2025 @02:18PM (#44016019)
I'd like to read a blog post on this subject, if anyone knows one.
Re:Pyrefly: A new type checker and IDE experience for Python by dontlaugh on Sunday May 18, 2025 @03:34AM (#44019657)
I don’t know about a blog post, but I mean the obvious stuff like codegen, generics/templates or macros to achieve the same things Python does by being dynamic.

Almost no one actually uses eval/exec.

Re:Pyrefly: A new type checker and IDE experience for Python by rixed on Sunday May 18, 2025 @01:18AM (#44019161)
Not only duck types (ie structural type hierarchies) can be statically verified but they can be statically infered as well, as demonstrated for instance by ocaml since 1996.

"Here is a nickel, kid, get yourself a better programming language" :-p