Live data from Hacker News

Pyrefly: A new type checker and IDE experience for Python

engineering.fb.com

11–20 of 177 posts

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

#13

Seems there are at least three Rust-based competitors for type checkers in Python now (Microsoft, Facebook, Astral), and of course there's still mypy.

Close, Microsoft’s type checker Pyright is Typescript. Its still faster than mypy for me though.

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

#14
post #7

This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty

ty is so new right now - it only got its current name a few weeks ago!

That’s not true, they have been developing it as red knot for a good while :)

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

#15

Seems there are at least three Rust-based competitors for type checkers in Python now (Microsoft, Facebook, Astral), and of course there's still mypy.

They're all static type checkers right? None for runtime?

Yes. If you want runtime validation of data you’re taking in people recommended pydantic. If you’re looking for runtime validation within your own code I’ve seen people use beartype, though to be honest I don’t personally understand the value added from it

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

#16

This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty

Because this has been tested at Meta / Facebook scale which means it's faster for any Python codebase massive and small.

Since Meta built this, I have confidence this will be maintained more than others and I will use this and ask for Pyrefly experience in the future.

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

#18

This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty

Because this has been tested at Meta / Facebook scale which means it's faster for any Python codebase massive and small. Since Meta built this, I have confidence this will be maintained more than others and I will use this and ask for Pyrefly experience in the future.

I suggest you try uv and ruff and then see if you still think only companies the size of meta can provide quality tooling.

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

#19
post #6

This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty

I think astral and meta were both working on their own type-checkers independently. My current understanding is that meta released so they could preempt the initial release of ty. It seems like they're a bit further ahead in development. Not sure if there are going to be any real differences between the two down the line.

Sounds a lot like TypeScript and Flow.

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

#20

Earlier quoted context omitted.

They're all static type checkers right? None for runtime?

Yes. If you want runtime validation of data you’re taking in people recommended pydantic. If you’re looking for runtime validation within your own code I’ve seen people use beartype, though to be honest I don’t personally understand the value added from it

...or Marshmallow, which allows one to do many complex validations in a relatively trivial manner.
Post reply on HN