Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Integer overflow is one type of bugs that can lead to catastrophic failures. Think billing systems that suddenly starts paying customers rather than charging them or rockets firing in the opposite direction. Therefore I think you can say that Python is safer because it prevents one class of bugs that these languages doesn't.

Another reason for saying so is because it's an example of performance meeting safety. Julia, Nim and Rust choose performance, ostensibly to score well on benchmarks which I think is irresponsible. Python choose safety which I prefer. In the future, these languages will again choose performance ("zero-cost abstractions") to preserve their benchmark rankings over essential safety and programmer ergonomics. Another area in which these languages make compromises for performance is in the legibility of stack traces.

It is true that Python doesn't do fractional arithmetic correctly which I think is a flaw. Newer languages should use rational arithmetic by default. 6/5 - 1 should evaluate to 1/5 not 0.19999999999999996.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: