Law as Computer Code
Cluster debates the analogy between laws and programming code, discussing ambiguities in legal language, the feasibility of encoding laws in code for precision, and the necessity of human interpretation by judges.
Activity Over Time
Top Contributors
Keywords
Sample Comments
The main issue with law is that it is written in an ambiguous language.Theoretically you could write more precise laws with code.Maybe they should have let a group of contract lawyers proofread what the code does. Lawyers look for bugs, inconsistencies, errors, loopholes all the time.
Instead of encoding laws in a programming language, they could encode the test cases in a natural language. List a bunch of specific scenarios and be explicit about how the law should be interpreted for them. Every time a judge makes a ruling on an uncovered scenario it gets added to the list. This would take about 90% of the work out of being a lawyer and would make the legal system much more accessible.
"A law" is not like "a line of code".
The law is like a piece of really stinkingly bad code. There's even a StackOverflow for law: https://law.stackexchange.com/ perhaps officials should check it out some time.
Writing laws to cover complex situations is really not THAT different from writing software. Laws are programs.In that context, does it really seem so absurd that the rules are "obtuse"? Many people feel that way when reading someone else's code, but that doesn't mean all the weird conditionals are unnecessary.
The law should be a programming language. The fact that it's not isn't a feature, it's a bug.
Legalese might be similar to code, and there is lots of interest in making law machine readable. So don't give up; check back later.
Legal codes aren't meant to work like programming languages. It is impossible for a legislator to predict how the world will work when their law is applied, and it is highly unlikely that they will anticipate every situation and context in which their law will be invoked.Judges and juries and lawyers all exist to help us interpret the inexact legal code in a way that is (hopefully usually; but obviously not always) fair and reasonable given the often-nuanced situations at hand.
Law is like computer code, if:- your compiler was AI-complete and adversarial and hated you- your compiler was also not bound by any hard rules and could emit undefined behavior at any time- your job scheduling and orchestration system was AI-complete and adversarial and actively hated you- your runtime library had 50 different incompatible canonical implementations and can only be run by being forked by publicly-elected officials who blindly merge patches from bad-faith lobby
It is very common to naively think laws should be rewritten to be clearer but experience quickly shows why that doesn’t work. Basically laws can only work when they are interpreted by reasonable jurists because the real world is full of grey areas and human language is not clear enough to fully divide the space of “everything that can happen in the world” into clear legal and illegal categories.In programming terms, an appeal’s court deciding an exact number of days police can confiscate prop