5 ms·
I’m pretty cautious about changing my own code, but even I am not paranoid enough to write tests to verify that freakin’ strings still have the behavior I rely
by erik_seaberg 4y ago
I’m pretty cautious about changing my own code, but even I am not paranoid enough to write tests to verify that freakin’ strings still have the behavior I rely on.
At least not until the day they suddenly didn’t.
- groestl 4y agoYes, and that's one reason why a static compiled type system helps you maintain code, dependencies and language I'd say.
- t43562 4y agoI tried adding type hinting to a program that I had to maintain once - because it had no unit tests and I was looking for the quickest way to make it less fragile. One tended to make a small change and then find that it broke something somewhere but finding that out was a long process. FWIW I found it nearly useless - whereas biting the bullet and refactoring it so that it could be unit tested - even just a few tests - made a world of difference.
- nibbleshifter 4y ago> At least not until the day they suddenly didn’t. That's been happening more and more recently to me. Python 2 really was lax about letting you mix types and get shit done fast, but Python 3 is a different beast entirely. Really opinionated.