Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
blog.edward-li.com
Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
1–10 of 166 posts
Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#2The gradual guarantee that Ty offers is intriguing. I’m considering giving it a try based on that.
With a language like Python with existing dynamic codebases, it seems like the right way to do gradual typing.
Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#3> ty, on the other hand, follows a different mantra: the gradual guarantee. The principal idea is that in a well-typed program, removing a type annotation should not cause a type error. In other words: you shouldn’t need to add new types to working code to resolve type errors. The gradual guarantee that Ty offers is intriguing. I’m considering giving it a try based on that. With a language like Python with existing d…
Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#4Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#5> ty, on the other hand, follows a different mantra: the gradual guarantee. The principal idea is that in a well-typed program, removing a type annotation should not cause a type error. In other words: you shouldn’t need to add new types to working code to resolve type errors. The gradual guarantee that Ty offers is intriguing. I’m considering giving it a try based on that. With a language like Python with existing d…
More restrictive requirements (ie `noImplicitAny`) could be turned on one at a time before eventually flipping the `strict` switch to opt in to all the checks.
Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#6Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#7I hope some typechecker starts doing serious supported notebook integration. And integration for live coding, not just a batch script to statically check your notebook. Finding errors with typing before running a 1-60 minute cell is a huge win.
Re: Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
#8> ty, on the other hand, follows a different mantra: the gradual guarantee. The principal idea is that in a well-typed program, removing a type annotation should not cause a type error. In other words: you shouldn’t need to add new types to working code to resolve type errors. The gradual guarantee that Ty offers is intriguing. I’m considering giving it a try based on that. With a language like Python with existing d…
I get where they're coming from, but the endgame was a huge issue when I tried mypy - there was no way to actually guarantee that you were getting any protection from types. A way to assert "no graduality to this file, it's fully typed!" is critical, but gradual typing is not just about migrating but also about the crazy things you can do in dynamic languages and being terrified of false positives scaring away the people who didn't value static typing in the first place. Maybe calling it "soft" typing would be clearer.
I think gradual typing is an anti-pattern at this point.