https://xcancel.com/charliermarsh/status/1884651482009477368
We’re building a new static type checker for Python, from scratch, in Rust.
From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
Like Ruff and uv, there will be a significant focus on performance.
The entire system is designed to be highly incremental so that it can eventually power a language server (e.g., only re-analyze affected files on code change).
Performance is just one of many goals, though.
For example: we’re investing heavily in strong theoretical foundations and a consistent model of Python’s typing semantics.
(We’re lucky to have @carljm and @AlexWaygood on the team for many reasons, this is one of them.)
Another goal: minimizing false positives, especially on untyped code, to make it easier for projects to adopt a type checker and expand coverage gradually over time, without being swamped in bogus type errors from the start.
We haven’t publicized it to-date, but all of this work has been happening in the open, in the Ruff repository.
All driven by a uniquely great team: @carljm, @AlexWaygood, @sharkdp86, @MichaReiser, @DhruvManilawala, @ibraheemdev, @dcreager.
I’m learning so much from them.
Warning: this project is not ready for real-world user testing, and certainly not for production use (yet). The core architecture is there, but we’re still lacking support for some critical features.
Right now, I’d only recommend trying it out if you’re looking to contribute.
For now, we’re working towards an initial alpha release. When it’s ready, I’ll make sure you know :)
I use stub files and mypy, but have concerns about behavior.
Thought the point is to move the static type checking stuff into a separate file. This makes the code much easier to read.
When a particular stub file becomes out of date, contents don’t reflect what’s going on in the code, there is no warning.
inner functions are ignored.
a functions contents are ignored.
Reluctant to use a library running node (gh actions aside) or Rust. My opinion is speed and correctness are insufficient arguments to introduce another tech stack. If something breaks, suddenly the onus is on me to understand why. That’s complicated if the additional tech stack is in a coding language i’m unfamiliar with.
This takes out: ruff, uv, and pyright. And whatever else comes out.
Have seven published python packages.
Trying to be open minded. Please layout other arguments why should be open to utilizing other tech stacks.
I think there’s two perspectives here: one as a potential contributor, and one as a “simple” user.
as a potential contributor, sure, the language of the tool matters. something breaks and you go investigate the source files to figure out why and maybe open a PR. In that case, a different tech stack is no good - you’ll have to learn a totally new language!
however as just an end user, I see no problem with something being written in whatever language. regardless of the implementation, all I do is open GitHub and file a new issue (if that). I don’t care about whatever stack is being used, I never even look at it.
so it depends on your approach to your own usage pattern. aside from those options, I would expect any sufficiently well-designed tool to not require me to understand language of implementation to know why some particular invocation didn’t work. and of course in the ideal world, if you use it and it works perfectly, then the question is immaterial anyway.
There is no such thing as an end user. Those folks who are on a smartphone playing a video game or watching youtube? And absolutely paying using a convenient digital payment method.
They are not us
Lets pray they die out quickly.
Python is a pile of interconnected packages, very rarely do they get woven into an end user facing app.
Instead we are interacting with packages. If the package doesn’t work: the maintainer is gone, refuses ur request, or doesn’t respond in a timely manner, the onus to fix the mess is on us.