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

Why do people hate C?


"A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980 language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law."

-- C.A.R Hoare's "The 1980 ACM Turing Award Lecture"

Guess what 1980's language he is referring to.

Then in 1988,

https://en.wikipedia.org/wiki/Morris_worm


For the same reason we don't commute on horses anymore.

And safety.


What makes you think this has anything to do with hating C?


"CPython has historically encountered numerous bugs and crashes due to invalid memory accesses. We believe that introducing Rust into CPython would reduce the number of such issues by disallowing invalid memory accesses by construction. While there will necessarily be some unsafe operations interacting with CPython’s C API to begin with, implementing the core module logic in safe Rust would greatly reduce the amount of code which could potentially be unsafe."




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

Search: