Live data from Hacker News

Announcing the Beta release of ty

astral.sh

61–70 of 181 posts

Re: Announcing the Beta release of ty

#61
post #44
post #21

I really hope astral can monetize without a highly destructive rugpull, because they are building great tools and solving real problems.

"pyx" is their first commercial offering: https://astral.sh/pyx I agree though. Hope this is successful and they keep building awesome open-source tools.

Why the “y” look so wrong in the special font.

Re: Announcing the Beta release of ty

#62
post #58

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 chart does not describe speed (either in general or in any particular case). Speed/performance/latency is a thing users care about that is not included in the feature list.

Yea that one is fine and well covered in the blog post, and pretty easy to spot in light testing. I'm much more worried about the ones that are harder to spot until you have a false negative that turns into a real bug which would be caught by 1 tool and not another.

Re: Announcing the Beta release of ty

#63
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

tools like dataclasses and pydantic would like to have a word...

Re: Announcing the Beta release of ty

#64
post #6

Hopefully it gets added to this comparison: https://htmlpreview.github.io/?https://github.com/python/typ... If that table is anything to go by, Pyright is not to be underestimated. I have briefly tried ty (LSP) in Emacs and it seems to work well so far. The only questionable thing I've encountered is that when the signature of a method is shown, the type annotations of some parameters seem to be presented in a partic…

https://github.com/python/typing/pull/2137

PR is somewhat WIP-ish but I needed some motivation to do OSS work again :)

Re: Announcing the Beta release of ty

#65
post #49
post #45

Is there any study that shows that typing in Python improves code quality and reduce runtime issues?

Well, it's just a documentation suggestion for user. Having for me about same value as if it was written in pydoc. I'd really love to see such study as well

Agree, we already had a solution documenting types in docstring.

In my case they just add noise when reading code and make it more difficult to review

Re: Announcing the Beta release of ty

#66
post #35

Without digging too deep- what is the Django story? Django does a bunch of magic which is challenging for the type checkers to handle well.

Ty doesn't support Django yet, and it doesn't have a plugin system, so third party developers can't improve it. If you need Django support, it is better to stick to mypy or pyright for the time being.

Is Django planned? Or always going to be a non first party kind of deal?

Re: Announcing the Beta release of ty

#67
post #56
post #45

Is there any study that shows that typing in Python improves code quality and reduce runtime issues?

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

Specifically, it's like asking if there are any studies that demonstrate benefits of static typing. Are there?

Re: Announcing the Beta release of ty

#68
post #55
post #21

I really hope astral can monetize without a highly destructive rugpull, because they are building great tools and solving real problems.

My issue with them is that they claim their tools replace existing tools, but they don't bother to actually replicate all of the functionality. So if you want to use the full functionality of existing tools, you need to fall back on them instead of using Astral's "replacements". It's like one step forward and one step back. For me personally, speed of the tooling is not as important as what the tooling can check, whi…

If there are specific incompatibilities or rough edges you're running into, we're always interested in hearing about them. We try pretty hard to provide a pip compatibility layer[1], but Python packaging is non-trivial and has a lot of layers and caveats.

[1]: https://docs.astral.sh/uv/pip/

Re: Announcing the Beta release of ty

#69

Earlier quoted context omitted.

Note: while spec conformance is important, I don't recommend using it as the basis for choosing a type checker. It is not representative of the things that most users actually care about (and is not meant to be). (I was on the Python Typing Council and helped put together the spec, the conformance test suite, etc)

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 leeway here and this makes a huge difference to what it feels like to use a type checker.

For instance, mypy will complain about the following, but pyright will not (because it infers the types of unannotated collections as having Any):

  x = []
  x.append(1)
  x[0] + "oops"
The spec has nothing to say about this.

Diagnostics

The spec has very little to say about what a type checker should do with all the information it has. Should it complain about unreachable code? Should it complain if you did `if foo` instead of `if foo()` because it’s always true? The line between type checker and linter is murky. Decisions here have nothing to do with “what does this annotation mean”, so are mostly out of scope from the spec.

Configuration

This makes a huge difference when adapting huge codebases to different levels of type checking. Also the defaults really matter, which can be tricky when Python type checkers serve so many different audiences.

Other things the spec doesn’t say anything about: error messages quality, editor integration, speed, long tail of UX issues, implementation of new type system features, plugins, type system extensions or special casing

And then of course there are things we would like to spec but haven’t yet!

Re: Announcing the Beta release of ty

#70
post #44
post #21

I really hope astral can monetize without a highly destructive rugpull, because they are building great tools and solving real problems.

"pyx" is their first commercial offering: https://astral.sh/pyx I agree though. Hope this is successful and they keep building awesome open-source tools.

We're paying for pyx. Wouldn't have if we didn't enjoy enjoy uv and ruff.

It's definitely a narrow path for them to tread. Feels like the best case is something like Hashicorp, great until the founders don't want to do it anymore.

Post reply on HN