Author Topic: Laws should be written in computer language  (Read 195 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

Laws should be written in computer language
« on: March 26, 2024, 11:13:48 AM »
I was reading a recent US Supreme Court decision that involved how to interpret a statute that had a number of conditions that had to be met in order for a certain outcome to be triggered. The politics of the case and decision are not relevant to this post, plus it's always safer to avoid politics in forums such as these. But if you are interested in reading the source document, you can find it here:
https://www.supremecourt.gov/opinions/23pdf/22-340_3e04.pdf

The issue at hand in the case is how to read a section that lists three clauses as conditions to be met in order to get access to a particular outcome. The problem is the wording that was used in the statute. To paraphrase, it says:

Outcome X is granted if the applicant does not have-
  • condition A;
  • condition B; and;
  • condition C;
The plaintiff argued that ALL THREE must be met to prevent outcome X. The defense argued that any ONE of the three prevents outcome X.

Personally, I believe the defense is more correct when you look at the context, but regardless, it made me think how much hassle and confusion could be avoided if complex conditional clauses in legal writings were written in computer language. It would be simple to test in order to determine if it gave the intended results and would almost completely eliminate ambiguity.

It doesn't take much exposure to writing code to learn to appreciate how important it is to understand exactly what outcome you want, and then be able to construct conditional clauses that give the desired results. In this case, if they had used something like C# to write this clause, all confusion would easily have been eliminated. If the true intent was the defense's position, a clause like
Code: [Select]
if ( !A && !B && !C )
{
    outcome(X);
}
would work perfectly.

On the other hand, if the plaintiff's reading was what they really wanted, they could have written
Code: [Select]
if ( !(A && B && C) )
{
    outcome(X);
}

It's fascinating to me to read through all the linguistic arguments both sides go through to figure out how to parse the text. They actually touch on Boolean logic (although they don't explicitly label it as such) - trying to explain how 'not', 'and', and 'or' relate to each other when constructing complex conditionals. But in the end, you have two sides arguing over how to convert imprecise English text into the precise Boolean logic needed to consistently apply the statute.

But if the statute was just written in code in the first place, all ambiguity could be eliminated. And if there's still ever doubt about what the result should be with any given set of conditions, you can replace courts and lawyers with a simple compiler! A win for everyone, I say.

Maybe I should run for congress on that platform!

Or maybe we can just wait for AI to achieve sentience. I suspect our cyber overlords will handle all their legal affairs with much cleaner language than what we use today. It'll probably be in machine code, though, so they'll be the only ones who understand it.



Offline Kawa

Re: Laws should be written in computer language
« Reply #1 on: March 26, 2024, 12:08:23 PM »
I feel like legalese is already quite akin to programming language. It's just that both of them can have bugs.

Offline AGKorson

Re: Laws should be written in computer language
« Reply #2 on: March 26, 2024, 04:02:17 PM »
Yeah, I agree. But with my conspiracy theory hat on, I'd say there are a lot more 'bugs' in legalese, and that many of them are there intentionally! :-D Lawyers probably consider them to be 'features' and not 'bugs'.

Offline lskovlun

Re: Laws should be written in computer language
« Reply #3 on: March 26, 2024, 05:43:24 PM »
At least make them improve their version control.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.063 seconds with 23 queries.