3 ms·
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 la
by IshKebab 2y ago
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.
- deleted 2y ago[deleted]
- nicce 2y ago> 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.