News for hackers. Stuff that matters.
Re:Why Today's Python Developers Are Embracing Type Hints by throwaway81523 on Saturday September 27, 2025 @07:31PM (#45400248)
I would say mypy is better than nothing but it still misses things sometimes, and makes some signatures difficult or impossible to write. I use it anyway, but patched-on static typing (Erlang, Clojure, and Racket also have it) seems like a compromise from the get-go. I'd rather have the type system designed into the language.
Re:Why Today's Python Developers Are Embracing Type Hints by IshKebab on Sunday September 28, 2025 @04:38AM (#45402745)
Mypy is trash but Pyright is very good.
Re:Why Today's Python Developers Are Embracing Type Hints by chpatrick on Sunday September 28, 2025 @07:05AM (#45403444)
I went from mypy to pyright to basedpyright and just started checking out pyrefly (the OP), and it's very promising. It's written in Rust so it's very efficient.
Re:Why Today's Python Developers Are Embracing Type Hints by mcronce on Sunday September 28, 2025 @07:24PM (#45408956)
You know you can just use a compiled language with statically checked types, right?
Re:Why Today's Python Developers Are Embracing Type Hints by chpatrick on Monday September 29, 2025 @10:55AM (#45414602)
For the kind of work I'm using Python for (computer vision, ML), not really. The ecosystem isn't there and even when it's possible it would be much less productive for very little gain. Typed Python actually works quite well in my experience. We do use C++ for some hand-written things that need to be fast or use libraries like CGAL, but it has a lot of disadvantages like the lack of a REPL, slow compile times and bad error messages.
Re:Why Today's Python Developers Are Embracing Type Hints by IshKebab on Tuesday September 30, 2025 @02:40AM (#45422602)
Python is the second most popular programming language in the world. It's not that easy to avoid.