News for hackers. Stuff that matters.
Re:Python's Type Checking Renaissance by mpweiher on Wednesday January 27, 2021 @03:56AM (#25925813)
Hmm...the basic development cycle described is horribly broken:

   Write a bunch of new code.
   Repeat 4-6 times, in rapid succession:
     Run program to manually test.
     Find basic error (like a missing import).
     Fix basic error.
   Debug/fix deeper errors in the new code
With this, just about anything will help, including static typing.

The problem is the following line

    Run program to manually test.
You should avoid manual testing at (almost) all cost. Write an automated test instead. It is effort your are expending anyway, why throw it away?? And while you're there, write the test beforehand, to clarify the specification of the code you're trying to write.

With such a TDD cycle, those problems wouldn't have happened.

    Repeat
      Write a test
      Make it pass
      [Commit]
      Refactor
      Commit
    
Mind you, static typing can still help in this scenario, but not in getting the code to work and helping it remain functional. It helps as verified documentation that eases understanding when reading the code.
Re:Python's Type Checking Renaissance by mixmastamyk on Thursday February 04, 2021 @10:06PM (#26032594)
Yes, my first test is always running pyflakes, which finds the most egregious bugs quickly.