| ▲ | estebank an hour ago | |
This is in effect a state machine, and when you have a type system more complex than C's you can encode state transitions in the type system (either by having state transitions explicitly return a new return type or by using sum types). You still need to architect the system to encode the invariants in types. No language will fix all logic bugs for free. But you can leverage language features to reduce their number. | ||
| ▲ | fsddfsdfssdf an hour ago | parent [-] | |
> You still need to architect the system to encode the invariants in types. That's the problem though, right? If it's pointed out we all agree the "do not keep credentials alive" is a property that should hold and we can leverage whatever the environment offers to help preserve it. I fully agree modern languages have amazing support for this, but in C you can still run tests. Let's just say I don't think the language's inability to express logic of this kind held all those involved back from testing for it. I personally find "we just didn't think of it" much more likely. That said, I am not a fan of C and recommend leveraging whatever fantastic modern tooling is available to you. | ||