Comment by tasn

Comment by tasn a day ago

5 replies

1. Maybe it's time to drop the crazy runtime generation and have something statically discoverable, or at least a way to annotate the typing statically.

2. Astral indicated already they plan to just add direct support for Django and other popular languages.

3. As people replied to similar comments on the previous threads (maybe to you?): that's not why ty is fast and why mypy is slow. It's also an easy claim to disprove: run both without plugins and you'll see ty is still 100x+ faster.

WhyNotHugo a day ago

> 1. Maybe it's time to drop the crazy runtime generation and have something statically discoverable, or at least a way to annotate the typing statically.

That, and duck typing, are one of the biggest things that make Python what it is. If I have to drop all that for type checking and rewrite my code, why would I rewrite it in Python?

  • dontlaugh a day ago

    Having used Python for many years, it’s the least interesting aspect of the language. Almost all such tricks can be done with compile time meta programming, often even without API changes.

    • mixmastamyk a day ago

      I'd like to read a blog post on this subject, if anyone knows one.

      • dontlaugh 14 hours ago

        I don’t know about a blog post, but I mean the obvious stuff like codegen, generics/templates or macros to achieve the same things Python does by being dynamic.

        Almost no one actually uses eval/exec.

  • rixed 16 hours ago

    Not only duck types (ie structural type hierarchies) can be statically verified but they can be statically infered as well, as demonstrated for instance by ocaml since 1996.

    "Here is a nickel, kid, get yourself a better programming language" :-p