Live data from Hacker News

Announcing the Beta release of ty

astral.sh

111–120 of 181 posts

Re: Announcing the Beta release of ty

#111
post #59
post #56

Earlier quoted context omitted.

That's equivalent to asking if there are benefits of static typing.

Not quite, static typing is used at runtime, python type annotations are not

> static typing is used at runtime

Educate yourself before making such claims.

Re: Announcing the Beta release of ty

#112

Python programmers are crying out for types it seems. It’s a shame the Python foundation haven’t blessed a spec. Better to get everyone working on a single slightly imperfect standard than a morass or differing ideas.

Speaking as a Python programmer, no. Using types in a prototyping language is madness.

The point is you drop things such as types to enable rapid iteration which enables you to converge to the unknownable business requirements faster.

If you want slow development with types, why not Java?

Re: Announcing the Beta release of ty

#113

Earlier quoted context omitted.

Can you add some examples of the things users care about that aren't well covered by this? I empathize with everyone who wants a feature comparison chart so they can be confident switching without unknowingly losing important safety checks.

The conformance test suite is currently mostly focused on “what does an explicit type annotation mean” A shared spec for this is important because if you write a Python library, you don’t want to have to write a different set of types for each Python type checker Here are some things the spec has nothing to say about: Inference You don’t want to annotate every expression in your program. Type checkers have a lot of l…

In case you’re not well versed in Python typecheckers, in the mypy vs Pyright example, Pyright can be configured to complain about not annotating the collection (and so both typecheckers will yell at the code as written).

TypeScript takes the same approach in this scenario, and I assume this helps both be fast.

Re: Announcing the Beta release of ty

#114
post #9

Not impressed because when tried ruff, and discovered that it doesn't replace (basic) pylint check https://github.com/astral-sh/ruff/issues/970 so we have ruff then pylint (and looking at the number of awaiting PR of ruff feels bad)

Ruff is incredible, replacing a mountain of tools and rules with a single extremely fast linter/formatter. Given that it is updated and improved frequently, I’m curious if you have tried it recently, and if so what pylint rules are you using that it doesn’t cover?

Re: Announcing the Beta release of ty

#115
You guys are a godsend to the python tooling world. I’ve been far more excited about the impact rust is having on the software world than that of AI, and your work is a big part of that. While I have not seen any real net productivity gains from AI in mine or my juniors work, I’ve definitely seen real gains from using your tooling!

In fact as Jetbrains has been spending years chasing various rabbits including AI, instead of substantially improving or fixing PyCharm, without you steadily replacing/repairing big chunks of Pycharms functionality I would be miserable. If it came down to it, we would happily pay a reasonable license fee to use your tools as long as they stayed free for non-commercial usage.

Re: Announcing the Beta release of ty

#116

Python programmers are crying out for types it seems. It’s a shame the Python foundation haven’t blessed a spec. Better to get everyone working on a single slightly imperfect standard than a morass or differing ideas.

Speaking as a Python programmer, no. Using types in a prototyping language is madness. The point is you drop things such as types to enable rapid iteration which enables you to converge to the unknownable business requirements faster. If you want slow development with types, why not Java?

> Using types in a prototyping language is madness.

It's not a prototyping language or a scripting language or whatever. It's just a language. And types are useful, especially when you can opt out of type checking when you need to. Most of the time you don't want to be reassigning variables to be different types anyway, even though occasionally an escape hatch is nice.

Re: Announcing the Beta release of ty

#117
post #3

The title of this story should be "Announcing the Beta release of ty". A lot of people have been waiting for the beta specifically. I've been using Pyrefly and loving it compared to Pyright, but they recently shipped some updates with crash bugs that forced me to pin to a previous version, which is annoying. Unfortunately my first impression of ty isn't great either. Trying to install the ty extension on the current…

Apart from installation problems/crash issues, do you have some feedback about type checking with ty vs. pyrefly? Which is stricter, soundness issues, etc?

Both are rust/open-source/new/fast so it's difficult to understand why I should choose one over the other.

Re: Announcing the Beta release of ty

#118

Earlier quoted context omitted.

The conformance test suite is currently mostly focused on “what does an explicit type annotation mean” A shared spec for this is important because if you write a Python library, you don’t want to have to write a different set of types for each Python type checker Here are some things the spec has nothing to say about: Inference You don’t want to annotate every expression in your program. Type checkers have a lot of l…

In case you’re not well versed in Python typecheckers, in the mypy vs Pyright example, Pyright can be configured to complain about not annotating the collection (and so both typecheckers will yell at the code as written). TypeScript takes the same approach in this scenario, and I assume this helps both be fast.

They were "on the Python Typing Council and helped put together the spec, the conformance test suite, etc" so I assume they are an expert on Python typecheckers

Re: Announcing the Beta release of ty

#119

Python programmers are crying out for types it seems. It’s a shame the Python foundation haven’t blessed a spec. Better to get everyone working on a single slightly imperfect standard than a morass or differing ideas.

Speaking as a Python programmer, no. Using types in a prototyping language is madness. The point is you drop things such as types to enable rapid iteration which enables you to converge to the unknownable business requirements faster. If you want slow development with types, why not Java?

because i want fast development with types.
Post reply on HN