Have to add that we work exclusively in strongly-typed languages. Kinda want to see how it plays out, but I can’t help but argue with him, so I think I’ll just go.

  • Pyro@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 month ago

    Python 3.x will never have static typing because that would break backwards compatibility.

    However, typing hints have been Integrated into Python for a while, and you are heavily recommended to use them, so your IDE can enforce typing.

    • Kache@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      Also have the option of selectively/strictly enforcing in CI, to get an experience & protections similar to “compile-time type checking”

    • xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Considering there is typing in the code why is there no switch to enable type checking at runtime? PHP does this with a per file declare(strict_types) - why would python be unable to have either a global or per file flag to enable checks?

      • Pyro@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        Typing when you need it gives you more freedom over a toggle. You can choose to type some parts of the code while leaving other parts untyped.

        For example, if I’m writing a quick and simple Python script I may forgo typing, but when iterating on it I’d go back and add the types I need.