News for hackers. Stuff that matters.
Re:Pyre: Fast Type Checking for Python by dep_b on Saturday May 12, 2018 @08:28AM (#17053744)
Static typed languages are harder to test. So if you do cover 100% dynamic is not so bad. However well built static languages reduce the things that need to be tested in the first place. Like non-nullabilty in Kotlin and Swift.
Re:Pyre: Fast Type Checking for Python by hugofirth on Saturday May 12, 2018 @09:55AM (#17054084)
I have to ask: what makes you think that staticly typed languages are harder to test? My experience is precisely the opposite. Large testing codebases can benefit hugely from the increased refactorability. In addition, the types help to explicitly define the contracts you need to test.
Re:Pyre: Fast Type Checking for Python by majewsky on Saturday May 12, 2018 @03:18PM (#17055559)
I think what dep_b refers to is that, in dynamic languages, you usually have an easier time injecting mocks and doubles. In a staticly typed language, it's usually much harder to inject mocks for IO, network, clock, etc., unless the original code has already been written to afford that (e.g. that whole Dependency Injection mess in Java).
Re:Pyre: Fast Type Checking for Python by dep_b on Saturday May 12, 2018 @04:30PM (#17055867)
That's exactly what I meant, thanks