| ▲ | jcranmer 4 hours ago | |
Trying to treat law as code-in-English-form is going to lead you horribly astray, however. The behavior of C code is something that we can, in principle, reduce to semantics in a formal model we know how to describe the behavior of. Now, there's some issues getting there--the specification is more ambiguous than we'd like, and there's definitely certain behaviors that are very challenging to incorporate in a formal model (say, signal handlers). But even something like UB is something that we have good, well-understand models of what exactly it means to hit UB. At the end of the day, whether or not C code is correct, whether or not the compiler is correctly compiling the C code, is a question that has a clearly objective answer. Law doesn't work like that. Laws are written and interpreted with the understanding that there is flexibility in the mater. If you compute the law and get an absurd result, then people are going to shrug and throw out the absurd result; rather different it is to a compiler where the absurdity is accepted as correct. As a result, there's not really an objective answer to whether or not something is legal, to understanding what will happen in a legal case, like there is to code. | ||