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

> maybe safe languages will let you do this explicit cast as well

They will let you, but explicit casts are a red flag in code review.



So in other words it wouldn't have made a difference.

A better type system gives you the option to enforce stricter checks to help you catch mistakes, but the same people with the same procedures would have written this bug in any language.


Not necessarily. If any unsafe constructs are locally visible during code review, and the language is such that unsafe constructs are rarely required, then it's much easier to give unsafe constructs a higher level of scrutiny that you can't afford to do in a language like C where unsafe things are pervasive and the same line can easily be safe in one context and unsafe in another.


"during code review". But did this code go through code review? If not your "higher level of scrutiny" are still not high enough to warrant mention.


I don't know about SystemD's code policies. But certainly serious vulnerabilities have been found even in C code where changes went through code review (the famous Chrome sandbox escape due to an undefined bitshift was noted to have been reviewed and explicitly "LGTMed" by two people).

And the decision about whether to code review is not necessarily static. A language that reduces the cost and/or increases the benefits of code reviews changes the decision space. And a more expressive language can free up developer time to spend on things like code review.




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

Search: