I really want to agree with you; this is how law should work (and why "law is like software" analogies are so fundamentally wrong, software doesn't make judgement calls). The problem is that people are involved, which means some of the judges will show poor judgement, including possibly okay'ing something if their friends do it but not if other do, or other less obviously unfair things.
I don't see a solution; the obvious choice of trying to make the law more specific and thus less reliant on judgement gets us back to the idea you are opposing.
I don't see a solution; the obvious choice of trying to make the law more specific and thus less reliant on judgement gets us back to the idea you are opposing.