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

Very C centric.

> The assertion density of the code should average to a minimum of two assertions per function.

I would actually say the opposite in modern languages like Rust. Assertions are a sign you have failed to encode requirements in the type system.



> I would actually say the opposite in modern languages like Rust. Assertions are a sign you have failed to encode requirements in the type system.

Maybe. You still shouldn't write unsafe code without asserts.




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

Search: