洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

With high-performance type checkers like , , and now available, what's the value proposition of ? Is it the reference implementation? Or does Mypy still have the most features? I'm not trying to knock Mypy, I'm genuinely asking because I don't know.

Matthew Martin ☑'s avatar
Matthew Martin ☑

@mistersql@mastodon.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee I haven't compared all pairs but they catch slightly different typing errors, disagree with each other on what is an error and for the longest time, mypy found the most things that I agreed was an error. I imaging pyright has features optimized for syntax checking in an IDE, and pyrefly is optimized for slowly moving a large monorepo at facebook to being typed.

I'm betting ty is going to be a faster mypy, but I don't know. Just being a faster thing is astrals thing, tho.

David Reed's avatar
David Reed

@aoristdual@floss.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee Mypy can check types in Python metaprogramming patterns that other type checkers don't even try to handle. Typechecking Django models is one example.

Eric Gerlach

@egerlach@hachyderm.io · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee MyPy is the reference implementation. You nailed it. And as others have mentioned, it does cover some tricky things that other checkers do not (precisely because they are tricky/hard to implement/slow)