3 ms·
I like programming assert-heavy C. As soon as something is out of wack with my mental model the whole thing explodes. I sure as hell don't want to try handling
by eliasmacpherson 13y ago
I like programming assert-heavy C. As soon as something is out of wack with my mental model the whole thing explodes. I sure as hell don't want to try handling things I don't already understand.
- foobarbazqux 13y agoYou can use asserts in an exploratory fashion to document code you don't understand too.
- faddotio 13y agoNot so good for code that runs in servers, since you have no chance to drop requests or degrade gracefully.
- eliasmacpherson 13y agoIf you hit it with enough examples of input as was done here, you can be fairly confident. But you're right, short of that, assert heavy code is going to cause headaches in servers. C is a nice and quick language to run tests on which makes it doable.