News for hackers. Stuff that matters.
Re:Python's Type Checking Renaissance by cozzyd on Wednesday January 27, 2021 @12:43AM (#25924739)
right, but for languages that support monkey-patching, this is going to be hard. e.g.:

  setattr(type(x),sys.argv[1],x.a)
or

  setattr(type(x), 'b' if halts(sys.argv[1]) else 'c',x.a)
Re:Python's Type Checking Renaissance by UncleMeat on Wednesday January 27, 2021 @11:21AM (#25930102)
Yes, static analysis of highly dynamic languages like javascript or ruby is tremendously difficult. Sound results are nearly impossible because you need to havoc so frequently. But if you permit some error and ask for a little extra help from developers in cases outside normal style for a language you can still do a pretty good job.
Re:Python's Type Checking Renaissance by KMag on Wednesday January 27, 2021 @02:07AM (#25925178)
Presumably, you'd have an escape hatch in the from of specially formatted comments to annotate each questionable call site. My understanding is that even strong proponents of monkey patching feel it should be used sparingly.