Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

21–30 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#21
My hunch is, in any sufficiently large rule set, there will be inconsistencies. Handwaily think Gödel, or just the need for bounded domains in DDD.

Humans (or, well, AI) is needed to cope with inconsistencies.

That said, pointing out the fact of existence of inconsistencies could be very valuable. But a system needs to embrace them, not fight them.

Re: CatalaLang/catala: Programming language for law specification

#22
post #9

Lawyer here. Oh, this again. I suppose this looks relatively harmless, but I'm always wary of "law is like computer code." The impulse to think this can strongly solve any real problem in the law is intuitively attractive, but I strongly predict this mostly never happens; it's the law's job to be intensely practical in the face of hard-edged "computer-like" rules. If anything, you get goofy confusion about what thing…

> If anything, you get goofy confusion about what things "are?" My go-to on this is always the "smart contract" -- which can be useful little bits of automated robot money moving code, but emphatically are neither "smart" nor "contracts." They are contracts—just not legal contracts. One of many types of contracts in the world that are not legal constructs.

> They are contracts—just not legal contracts

I think this proves op’s point of goofy confusion for what things are.

Re: CatalaLang/catala: Programming language for law specification

#23
post #10

Very cool. Pessimistically, I think that having a clear, understandable view of legal text so that people can navigate the law safely is against a lot of entrenched interests.

I don't think it's that. It's hard to write legal texts, and sometimes it's better to be vague, so the courts have some freedom when establishing jurisprudence. Treaties can be written with vague wording to allow parties to sign it, even if there isn't 100% agreement. That's an old practice.

On the contrary, it's much better to have very clear text, otherwise it will turn against the citizen.

Imagine that you have an income tax where "income" isn't clearly defined. Someone will end up with an audit and a lawsuit from the tax office because their definition will be, of course, extensive (every income, including non-realized capital gains) whereas most citizens would only consider salaries.

In the end, you create legal uncertainty, and give courts way too much power.

For the record, I used to work for my country's government, and had to evaluate some laws in making that were written in an abstruse way. When I asked why, the civil servant told me that it was so "they could pick the most favorable meaning in the case of a lawsuit".

Re: CatalaLang/catala: Programming language for law specification

#25
post #19
post #9

Lawyer here. Oh, this again. I suppose this looks relatively harmless, but I'm always wary of "law is like computer code." The impulse to think this can strongly solve any real problem in the law is intuitively attractive, but I strongly predict this mostly never happens; it's the law's job to be intensely practical in the face of hard-edged "computer-like" rules. If anything, you get goofy confusion about what thing…

I can assure you that the person who wrote this is very well aware of the subtleties involved with formalising the law. Law + Programming is an active research field ( https://popl23.sigplan.org/home/prolala-2023 ), and it is very far away from anything like smart contracts, it is full of brilliant people who have no pretension of replacing the law with computers, but simply be helpers where they can.

I agree. The idea of logically representing law isn't the same as replacing law with computers. That's why I even posted this.

Re: CatalaLang/catala: Programming language for law specification

#26

Earlier quoted context omitted.

> If anything, you get goofy confusion about what things "are?" My go-to on this is always the "smart contract" -- which can be useful little bits of automated robot money moving code, but emphatically are neither "smart" nor "contracts." They are contracts—just not legal contracts. One of many types of contracts in the world that are not legal constructs.

Most contracts are intended to be enforceable by law, as far as I know. Which kind of non-enforceable contracts did you have in mind?

Software-interface contracts generally aren’t (cf. Design by Contract). The parent is correct insofar as the use of the word “contract” is not limited to contracts as defined by law.

Re: CatalaLang/catala: Programming language for law specification

#27
post #9

Lawyer here. Oh, this again. I suppose this looks relatively harmless, but I'm always wary of "law is like computer code." The impulse to think this can strongly solve any real problem in the law is intuitively attractive, but I strongly predict this mostly never happens; it's the law's job to be intensely practical in the face of hard-edged "computer-like" rules. If anything, you get goofy confusion about what thing…

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 lobbyists

- the documentation for any of those 50 runtime libraries is paywalled per page behind https://pacer.uscourts.gov/pacer-pricing-how-fees-work if you're lucky

- the IDE is Microsoft Word, and the linter is a summer associate on their tenth cup of coffee

- you will inevitably get a non-technical client who thinks that the more times you have "notwithstanding the foregoing" in your code the more you can call yourself Web Scale

Re: CatalaLang/catala: Programming language for law specification

#28
I think having a "linter" for laws can be beneficial. It can help producing laws that are easier to read and understand.

Having a "compiler" for laws can help identifying conflicts between different codes of law. e.g.: Imagine having a compiler error when a law is unconstitutional from a logical standpoint.

But verifying the "business logic" (e.g.: what is the spirit or intent of the law?) of the law will remain a human intelligence task.

Re: CatalaLang/catala: Programming language for law specification

#30
I think what I'd rather see is a standardize test suite format for laws that spells out the intentions.

Once I lived in a state that proposed a very simple anti-child porn law with good intent, but it was too simple. It read sort of like "anyone sending explicit pictures of minors from a cell phone will be guilty of conveying child porn". It was written in the proper legal jargon, but wasn't a whole lot more detailed than that. I called the sponsor of the bill and asked if that meant if my hypothetical daughter sent a naked picture of herself to her boyfriend, then wouldn't she be a felon under his new law? He had an "oh, crap, that's not what I meant!" reaction and ended up withdrawing the bill so it could be re-written. (Aside: I felt pretty good about that. Props to the legislator for being quick to understand and respond appropriately!)

Imagine if that were handled like program code, with a test like:

* This law does not apply to minors sending pictures of themselves.

That would do a few big things:

It would make legislators be clear about what they mean. "Oh, we'd never use this online child safety law to ban pro-trans content from the Internet!" "Great! Let's add that as a test case then." I confess that this is a deal breaker: politicians don't like being pinned down like that.

It would probably make it easier to write laws that reflect those intentions. "Hey, that law as written would apply to a 15 year old sexting her boyfriend! The code doesn't pass the tests."

Future courts could use that to evaluate a law's intent. "The wording says it applies to 15 year olds sending selfies, but the tests are explicit that it wasn't meant to. Not guilty."

I'm sure this couldn't happen for a hundred reasons, but I can dream.

Post reply on HN