this post was submitted on 28 Nov 2024
452 points (88.2% liked)

Programmer Humor

32692 readers
379 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 2 weeks ago (1 children)

without type safety your code is no longer predictable or maintainable

This sounds like someone who's never worked on a large Python project with multiple developers. I've been doing this for almost two decades and we never encounter bugs because of mismatched types.

For reference, the most common bugs we encounter are related to exception handling. Either the code captured the exception and didn't do the right thing (whatever that is) in specific situations or it didn't capture the exception in the right place so it bubbles up waaaaay too high up the chain and we end up with super annoying troubleshooting where it's difficult to reproduce or difficult to track down.

Also, testing is completely orthogonal to types.

[–] [email protected] 10 points 2 weeks ago (1 children)

This sounds like someone who's never worked on a large Python project with multiple developers. I've been doing this for almost two decades and we never encounter bugs because of mismatched types.

Have you worked on major projects in other languages in that time period to be able to compare and contrast?

The last two python projects I had to work on didn't have bugs because of type issues, but it was much harder to come into the codebase and understand what was going on given that you didn't have type information in many many places which forced you to go back and comb through the code instead.

[–] Incblob 2 points 2 weeks ago

So the code did have type hints, just not consistently. Sounds like bad code.