by mwt · 1y ago · 0 comments
- why not just contribute to the community tool?
- there's already a major split in Python type-checking tools, if there's a third that doesn't agree with either of them it'll be a mess for projects to deal with
- astral has been hiring like mad recently and has yet to communicate that they can actually make money ($5 million doesn't last forever)
- does it actually exist? is this currently a closed-source codebase, or is "we're building" future tense?
what community tool? mypy is written in python, and is non-incremental, whereas astral's goal is to build a fast, incremental type checker in rust. there is no way to get from one to the other via code contributions, they fundamentally need to start from scratch with their own architecture.
as for the split in type checking tools, it is not as bad as you think; the syntax and to a large extent the semantics of the type system are defined via a community process and standardised upon, and the various type checkers largely differ in their implementation details but not in their interpretation of the code. so you can freely use several different type checkers without fear of disagreement.
those people producing fantastic tools that have transformed the ecosystem of linting and packaging should be working on it instead of working on transformative tech
I'm surprised you already know it's not as bad as I think - have you been able to use it? Working on a team that mixes mypy and pyright is pretty frustrating since they don't agree on everything (i.e. when one changeset passes on one and fails on the other) and I see no reason to believe the inconsistencies will become more rare when the number of opinions goes from two to three
also if you do find a case where two type checkers genuinely conflict on a piece of code, one or both of them would definitely like to see it as a bug report. if the underlying cause turns out to be undefined behaviour in the specs, the general typing community will work together to nail it down and the type checkers will all adapt. in general it is a very cooperative process that values the existence of a common set of standards, which is why I think having more type checkers will only improve the situation wrt nailing down corner cases in the specs.
I'm happy you believe that the community can converge on unified standards - I wish I shared the optimism - but that's not where we're currently at and years-long efforts don't help me now. (For example, I'd love to use PEP 695 generics since I found a use case for them around 18 months ago but I can't until I can get away with not supporting 3.11, which is years out.) Maybe everything is perfect in 2028 or so - I'd be thrilled - but that doesn't help the pitch for annotations being a value add for people who are worried about the current jobs.
From the thread:
> We haven't publicized it to-date, but all of this work has been happening in the open, in the Ruff repository.
- re: the money: https://news.ycombinator.com/item?id=42869358