Comment by WhyNotHugo

Comment by WhyNotHugo a day ago

4 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.

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 16 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 18 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