Re:Strong typing, a hill I'm willing to die on
by packetlost on Wednesday October 04, 2023 @11:35PM
(#37774655)
In code review, explain what can go wrong and offer suggestions for how to write it such that it doesn't have those problems?
Re:Strong typing, a hill I'm willing to die on
by jpc0 on Thursday October 05, 2023 @10:59AM
(#37779461)
While discussing code review, howabout shooting whoever wrote that comment.
Why is there an assert? Python case a cast function if you really wanted to force the typechecker to see a_thing as Thing but (and I'm sure this is the point you are making) you are likely hiding a prolem.
We have large python codebase, all sorts of linters and checks.
Still have developers do something like:
Sure maybe it's a junior thing. But it still happens, and the typing doesn't save us. I don't know how to tell juniors to stop doing this