TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

"We're building a new static type checker for Python"

356 pointsby shlomo_z3 months ago

29 comments

theLiminator3 months ago
Very excited for this, looks like it&#x27;s built on top of pretty solid technical foundations (iirc, it uses salsa from rust for incremental type checking). I&#x27;ve found mypy pretty terrible. Pyright is okay (but requires node).<p>Ruff truly can become one tool to rule them all.
评论 #42870774 未加载
评论 #42870558 未加载
评论 #42873096 未加载
评论 #42884335 未加载
评论 #42872886 未加载
jasonpeacock3 months ago
It&#x27;s hard to find details...apparently it&#x27;s code named &quot;red knot&quot; (or &quot;red_knot&quot;).<p>Here&#x27;s the github issues filter linked in the screenshot:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;ruff&#x2F;labels&#x2F;red-knot">https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;ruff&#x2F;labels&#x2F;red-knot</a><p>And the best answer&#x2F;description of what the type checker will be:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;ruff&#x2F;discussions&#x2F;15149">https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;ruff&#x2F;discussions&#x2F;15149</a>
评论 #42873734 未加载
评论 #42871887 未加载
评论 #42886870 未加载
kittikitti3 months ago
I started learning Python when it was barely at version 1 precisely because there was no real static type checking. If I wanted that, I would just write the program in C or its variants. I wasn&#x27;t excited about type hints because developers became super judgy if there weren&#x27;t any. I just want to know why you&#x27;re using Python if you want stronger typing and feel the need to change the entire language instead of using another one yourself.
评论 #42871253 未加载
评论 #42871150 未加载
评论 #42871433 未加载
评论 #42871533 未加载
评论 #42871568 未加载
评论 #42872637 未加载
评论 #42871187 未加载
评论 #42871221 未加载
评论 #42871154 未加载
评论 #42871172 未加载
评论 #42872344 未加载
评论 #42871125 未加载
评论 #42882758 未加载
评论 #42872174 未加载
评论 #42874052 未加载
评论 #42872735 未加载
评论 #42875305 未加载
评论 #42891440 未加载
评论 #42885993 未加载
评论 #42872524 未加载
评论 #42873935 未加载
shlomo_z3 months ago
I am really excited.<p>Ruff is amazing, uv literally fixed all the python packaging issues we have, and now a type checker!!<p>Can&#x27;t wait to see it!
dcreager3 months ago
Bluesky cross-post for those who don&#x27;t want to read the thread on X: <a href="https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;crmarsh.com&#x2F;post&#x2F;3lgvhzdfrps26" rel="nofollow">https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;crmarsh.com&#x2F;post&#x2F;3lgvhzdfrps26</a>
评论 #42870542 未加载
评论 #42870567 未加载
esafak3 months ago
This is all very well but how are going to make money? They have taken VC investments.
评论 #42869358 未加载
评论 #42870161 未加载
评论 #42869247 未加载
评论 #42870044 未加载
ehutch793 months ago
My big question is django support.<p>Django has a lot of magic that makes type checking more difficult than it should be.<p>I&#x27;m not really expecting anything, even just the speed bump will be nice.
评论 #42873173 未加载
评论 #42871017 未加载
评论 #42875592 未加载
评论 #42872058 未加载
agumonkey3 months ago
Applaud the effort, but it&#x27;s weird seeing python (and es6) living more and more on top of native static analyzers&#x2F;transpilers .. at which point will they become a frontend syntax for ocaml or julia ? :p
评论 #42871128 未加载
评论 #42870901 未加载
评论 #42877256 未加载
monlockandkey3 months ago
They just need to add a task runner feature (already being worked on) and the one tool to rule them all would be complete. Package manager, linter, formatter, type checker, task runner. Am I missing something? Maybe a build tool?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;uv&#x2F;issues&#x2F;5903">https:&#x2F;&#x2F;github.com&#x2F;astral-sh&#x2F;uv&#x2F;issues&#x2F;5903</a>
评论 #42871182 未加载
screye3 months ago
At the risk of sounding like a fanatic, I bet it will be great.<p>Everything Astral have put out has been a step improvement to my python dev flow. Until they disappoint me, I&#x27;m staying on this hype train.
CapeTheory3 months ago
When it comes time to write Python 4, please just let these guys handle it.
评论 #42870156 未加载
nimish3 months ago
astral doing what the endless layers of admin&#x2F;people in the PSF can&#x27;t: solve actual problems python devs face
评论 #42886417 未加载
egeres3 months ago
Astral has consistently surprised the python community with amazing tooling. It was a matter of time before they jumped into type checking. I think ruff and uv were good first MVPs for a small company with a highly talented team. I can&#x27;t help but wonder if someday they&#x27;ll attempt to build their own Python interpreter in Rust, or if that&#x27;s overkill.
intalentive3 months ago
I would use a statically-typed Python that you can compile into a binary for better performance. Step 1: Develop fast in regular Python. Step 2: Add type annotations and build.
评论 #42870939 未加载
评论 #42877263 未加载
评论 #42871047 未加载
aldanor3 months ago
Final piece of the puzzle will be one LSP to rule them all, unifying all previous work - aka python-analyzer.
bmitc3 months ago
It&#x27;s interesting to me that one of the most popular, if not the most popular, language in the world and one that is decades old has tooling that is constantly evolving and being reinvented and now in another language than itself. Contrast this with Rust and Elixir which have developed superior tooling in just a decade or so. I just started with real Python development in the past year and have already switched basic tooling!
评论 #42884285 未加载
westurner3 months ago
Could it please also do runtime type checking?<p>(PyContracts and iContract do runtime type checking, but it&#x27;s not very performant.)<p>That MyPy isn&#x27;t usable at runtime causes lots of re-work.
评论 #42870555 未加载
exabrial3 months ago
Wouldn&#x27;t it make more sense to make a statically typed language? Like Crystal is to Ruby?
评论 #42881548 未加载
sureglymop3 months ago
<a href="https:&#x2F;&#x2F;nitter.poast.org&#x2F;charliermarsh&#x2F;status&#x2F;1884651482009477368" rel="nofollow">https:&#x2F;&#x2F;nitter.poast.org&#x2F;charliermarsh&#x2F;status&#x2F;18846514820094...</a>
joshdavham3 months ago
This is exciting! I&#x27;d love to be able to use something other than mypy, especially if it&#x27;s way faster!
评论 #42870803 未加载
wood-porch3 months ago
Good riddance! I’m optimistic that these guys will transform the typing landscape, which, let’s be honest, has room for improvement. I find mypy abysmal to use, bug-ridden with weird defaults, and extremely painful to add to an existing codebase
deneb1503 months ago
I&#x27;ve been waiting for this to happen, very excited to start using it.
globular-toast3 months ago
Is it going to be like mypy or pyright? Will it include an LSP server? Pyright seems more focused on the LSP server side and doesn&#x27;t seem as complete as mypy as a type checker.
评论 #42870533 未加载
jokoon3 months ago
I wonder why making those sort of tools is so difficult
hooverd3 months ago
Very cool. I wonder where the codename comes from?
评论 #42870101 未加载
LorenzoGood3 months ago
<a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a>
josh-sematic3 months ago
TL;DR on the status: they&#x27;ve been working on it for a while, but it&#x27;s not yet ready for playing around with.
binary1323 months ago
“We’re building a new high-speed seatbelt system for covered wagons”
mwt3 months ago
kinda mixed on this<p>- why not just contribute to the community tool?<p>- there&#x27;s already a major split in Python type-checking tools, if there&#x27;s a third that doesn&#x27;t agree with either of them it&#x27;ll be a mess for projects to deal with<p>- astral has been hiring like mad recently and has yet to communicate that they can actually make money ($5 million doesn&#x27;t last forever)<p>- does it actually exist? is this currently a closed-source codebase, or is &quot;we&#x27;re building&quot; future tense?
评论 #42871191 未加载
评论 #42870380 未加载
评论 #42870685 未加载