トップに戻る

コメント (13)

dsign5時間前
If you are going to be super-strict with type-checking, wouldn’t it be best to switch to a statically typed language and get the performance gains as well?
blahgeek5時間前
> Prioritise running as many type-checkers as possible on your test suite. Run at least one on your source code.

There are two types of tests: those that test against the public API, and those that test internal codes with various mocks and fakes. I think the vast majority of unit tests is the latter one, in which case the suggestion does not really make sense.

kingstnap5時間前
The fact that this article seems to honestly recommend people run 5 different type checkers on library test suits really reflects the tacked on feeling of Python typing.
voidUpdate5時間前
> "In Python, any method __eq__ is expected to return bool, and if it doesn't, then we need to explicitly tell type-checkers to ignore the type error. This function in Polars can also return different types depending on the inputs, thus requiring overloads."

Why would you ever want a == b to not return a bool??

EDIT: Yes, I understand that you can do element-wise equality checks on numpy arrays now

semiinfinitely45分前
Everything that isn't uv, ty, ruff is wrong and deprecated
KolmogorovComp4時間前
Why anyone would still use mypy besides legacy infrastructure is beyond me. It is dog slow as well as being the laziest of all, not catching many mistakes.

Unfortunately for Django apps switching to any alternative leads to the dreaded “wall of errors” issue. If anyone got to work this out in the past, I’d gladly take advices.

__mharrison__4時間前
I'm happy w/ ty right now. My agents runs it fast and it seems to provide great guardrails.
shermantanktop5時間前
That blog needs to run a AI checker. Content aside, a lot of the writing is pure AI style.

> The type checking that matters most (and why you've probably got it backwards)

Honestly, I don’t care if the author got some AI help. But that click-bait style is ubiquitous and obnoxious.

zerof1l4時間前
From my experience with Python, both personal and professional, I find it immature and not well-suited for large codebases. Typing should have become part of the language a long time ago; it is clear that users want it.

Take, for example, PHP… look at the features released in the last 6 or so years, starting with PHP 7, and how mature the language has become.

With the advance of AI-assisted programming, I feel like Python is always a bad choice.

ghostly_s4時間前
Why would users care if you're using the same type checker as them? Surely they're not expecting all their imports to be instrumented for running redundant types checks?
prodigycorp4時間前
what are ppls' impression of pyrefly? i've become completely captive to uv's tooling. it has allowed me to think only about coding versus tooling. dont feel like giving another typechecker a chance unless it offer's something i'm not getting from ty.
shevy-java4時間前
The type-lovers will be angry! :)

The blog entry fits into ruby too, to some extent; while the situation is nowhear near as bad as in python, you have the same question-marks why types suddenly emerge out of nowhere. Almost ... almost as if some people have a specific agenda, and try to pull through with it.

Well, there you have it - the type-addicted people are ruining python.

woeirua5時間前
With agents it no longer makes sense to tie yourself to Python's archaic development experience. How many type checkers are there? Package managers? Don't even get me started on cross-platform deployment.

Strongly typed, compiled languages have never been easier to use, and agents reap huge benefits from the tight feedback loop that the compiler provides. Moreover the benefits of the Python ecosystem are less significant today than anytime in the past 20 years. Need something that's only available in Python? Just point some agents at it and you can port it.