Live data from Hacker News

Pyrefly: A new type checker and IDE experience for Python

engineering.fb.com

61–70 of 177 posts

Re: Pyrefly: A new type checker and IDE experience for Python

#61

To repeat an earlier comment of mine from the launch of uv on hn (tl; dr: these new type checkers never support django): The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code. The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods. I wis…

The only type checker that fully works (meaning it successfully performs the necessary type inference all for inherited objects) for our large and highly modular python codebase, is Pycharm (I'm guessing it's their own custom tool from the ground up? Not really sure, actually.)

Re: Pyrefly: A new type checker and IDE experience for Python

#63

Why is "written in Rust" a feature to be mentioned? Who cares? So my type checker has memory protection and is compiled. I'm not running my type checker on an embedded system or in a mission critical service. It seems kind of like "written in Erlang". I'd prefer to have non-performance critical code for Python written in Python. That way the broader community can support and extend it.

Have you used Rust before? As a user, the speed and safety is nice. But as a developer, Rust projects are easier to hack on and contribute to. That's kind of the whole appeal of Astral. I know Python better than Rust, but it's a lot easier for me to hack on Rust projects. The whole appeal of Astral is that they want to bring Rust-quality tooling to Python.

> but it's a lot easier for me to hack on Rust projects

That static typing is nice, I wonder if it's going to catch on one day.

The amount of energy spent trying to bend dynamically types languages into being real ones is just comical. Even the standard library is barely typed, so they give no fucks https://github.com/python/cpython/blob/v3.13.3/Lib/re/__init...

What does it accept? Who knows. What does it return? Don't worry about it

Re: Pyrefly: A new type checker and IDE experience for Python

#65
post #63

Earlier quoted context omitted.

Have you used Rust before? As a user, the speed and safety is nice. But as a developer, Rust projects are easier to hack on and contribute to. That's kind of the whole appeal of Astral. I know Python better than Rust, but it's a lot easier for me to hack on Rust projects. The whole appeal of Astral is that they want to bring Rust-quality tooling to Python.

> but it's a lot easier for me to hack on Rust projects That static typing is nice, I wonder if it's going to catch on one day. The amount of energy spent trying to bend dynamically types languages into being real ones is just comical. Even the standard library is barely typed, so they give no fucks https://github.com/python/cpython/blob/v3.13.3/Lib/re/__init... What does it accept? Who knows. What does it return? Do…

Static typing is a big one, but I've been so steeped in Python that I don't appreciate it as much as maybe I should.

The big thing for me is that most Rust projects are statically(ish) compiled (like go) and only need a `cargo build`. No venvs or pip commands or node/npm/nvm or make, etc.

Re: Pyrefly: A new type checker and IDE experience for Python

#66
post #63

Earlier quoted context omitted.

Have you used Rust before? As a user, the speed and safety is nice. But as a developer, Rust projects are easier to hack on and contribute to. That's kind of the whole appeal of Astral. I know Python better than Rust, but it's a lot easier for me to hack on Rust projects. The whole appeal of Astral is that they want to bring Rust-quality tooling to Python.

> but it's a lot easier for me to hack on Rust projects That static typing is nice, I wonder if it's going to catch on one day. The amount of energy spent trying to bend dynamically types languages into being real ones is just comical. Even the standard library is barely typed, so they give no fucks https://github.com/python/cpython/blob/v3.13.3/Lib/re/__init... What does it accept? Who knows. What does it return? Do…

Hindly Milner type inference needs to catch on

Re: Pyrefly: A new type checker and IDE experience for Python

#67

To repeat an earlier comment of mine from the launch of uv on hn (tl; dr: these new type checkers never support django): The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code. The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods. I wis…

The problem is not with the type checkers.

https://code.djangoproject.com/ticket/32759

Similar (but lesser) problems exist with pydantic and sqlmodel. They're both fine projects except for:

https://www.reddit.com/r/Python/comments/1i5atpy/fquery_meet...

This is a long winded way of saying type checkers will deal with:

  @sqlmodel
  @pydantic
  @dataclass
  class MyModel:
    name: str

a lot better. Move what doesn't fit here to dataclass metadata.

Re: Pyrefly: A new type checker and IDE experience for Python

#68

Earlier quoted context omitted.

I feel like 70% of open source projects on GitHub say written in the language that they were written in

I feel like the likelihood that a project will say what language it is written in is much higher if that language is Rust. I like Rust but I do find this trend a little annoying. (Even though I acknowledge that "written in Rust" probably means the tool is relatively new, not buggy, and easy to use.)

[flagged]

Re: Pyrefly: A new type checker and IDE experience for Python

#69

Earlier quoted context omitted.

I feel like 70% of open source projects on GitHub say written in the language that they were written in

I feel like the likelihood that a project will say what language it is written in is much higher if that language is Rust. I like Rust but I do find this trend a little annoying. (Even though I acknowledge that "written in Rust" probably means the tool is relatively new, not buggy, and easy to use.)

> Even though I acknowledge that "written in Rust" probably means the tool is relatively new, not buggy, and easy to use.

I genuinely chose the language for one of my projects based on this reasoning. I want to be in the nice UX gang.

Re: Pyrefly: A new type checker and IDE experience for Python

#70
post #41

I'm a little worried on behalf of the "Python Language Tooling Team" at Meta, because uv has been so popular, and I wouldn't be surprised if ty wins out in this space. So watch out, or this will become like Atom or Flow, an internal competitor of a technology that is surpassed by the more popular external open source version, leaving the directors/vps muttering to themselves "It's too bad that this team exists at all…

Hey Kevin, we overlapped for a bit during your time at FB when I was working on Flow. Nice to hear from you!

I’m working on Pyrefly now, but worked on Flow for many years before. For what it’s worth, we are taking a different approach compared to Flow and have explicitly prioritized open source and community building, something I know we both care a lot about.

Of course, nothing is guaranteed and we’ve seen plenty of volatility in bigco investments to infra lately, but I do believe we’re starting this journey on the right foot.

Cheers, Sam

Post reply on HN