Hacker News new | ask | show | jobs
by deckar01 3378 days ago
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.
2 comments

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.

Isn't that how common law already works?

I think that was the joke, but I'm not 100% sure....
The tests are the lawsuits.
This is how some uniform laws are written. For example, each section of the Uniform Commercial Code (UCC) is followed by commentary, often including example situations. States are encouraged by the UCC committee to incorporate the commentary as part of the official statutes. That makes them binding. Where states choose not to incorporate the commentary, judges usually treat them as strongly persuasive (if non-binding) authority.

The nice thing about the code commentary is that it's easier to append or modify the commentary than a code provision itself. When a provision is changed all the case law is effectively discarded, creating tremendous uncertainty. But changing the commentary is much less likely to break backward compatibility, so to speak.

Of course, the UCC is much more carefully written and reviewed than ad hoc state legislation. The commentary is a little like gilding the lily, relatively speaking.