News for hackers. Stuff that matters.
Re:Our journey to type checking 4M lines of Python by realusername on Saturday September 07, 2019 @11:07PM (#20908363)
> The worst, buggiest, least maintainable code I've ever dealt with was a 500ish line (heavily tested!) untyped Python file at my last job. Caused more trouble than all the Java and C++ and Go combined.

Another problem with Python is that the culture of testing is definitely not as strong as in Ruby so you won't even get that to compensate the untyped nature of the language.

Re:Our journey to type checking 4M lines of Python by btown on Sunday September 08, 2019 @01:14AM (#20908742)
And yet another problem is that while Ruby classes require you to whitelist attributes (e.g. with attr_accessor) that will receive publicly-accessible getters/setters, Python classes by default allow the caller to "tack on" any instance variables they desire. (I've rarely seen __slots__ used in the wild, for instance.)

So the type of almost any class is really more like Struct{WhatYouThinkTheClassIs; ArbitraryDict;} ... and the temptation to misuse this, say for instance if you don't want to add arguments to function_used_lots_of_places(some_object), can be huge. And more generally, this openness means that there may be discrepancies between what's unit tested for a class, and how that class is used in the wild.