← Back to context

Comment by saghm

4 hours ago

Yeah, I have no idea what they're talking about with that one. I've caught bugs when reviewing code without needing to run it before, and I've had the same happen to me in reverse, and I've seen it happen between others on reviews I was observing. I guess they could find some way to define "in general" so that this is technically true, but at that point it's not particularly meaningful.

I read it as a reference to some theoretical limitation like the Halting Problem.

Fine, in general it is not possible to tell if code will halt. But if I see a while(1) I’m going to check if the loop can break.

  • Arguably, if you can’t tell if the code will halt, the code is not acceptable. Code is acceptable if it can be properly reasoned about. If it can’t, it is not.