Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

151–160 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#151

Earlier quoted context omitted.

This is quite a misunderstanding of how the law actually works, probably enhanced by lots of lawyer TV emphasizing obscure wording tricks. In reality, laws are already written in a relatively normal language, and the words almost always mean exactly what they mean in plain English. The only problem is that the legal concepts they describe are themselves complex, and often they end up in a tangle of references to othe…

I don't watch that kind of television much, but since I'm not a lawyer, my view of the world is probably too simplistic. Still I'd argue that normal language is very poor at handling that tangle of references. A good programming language would make those references very easy to untangle and present in their untangled form. When I've read (Danish) laws, I've often thought that they would read better as if statements.…

> A good programming language would make those references very easy to untangle and present in their untangled form.

Not necessarily. Notation can only do so much to help with understanding. To understand 4+4=8 you still need to understand what's a number, what addition means, and what it means for two numbers to be equal. The same problem applies to the law, and it takes far more time to understand legal concepts than the actual wording.

Additionally, the law is not supposed to be some arcane discipline that you need to learn a new language for. The law is decided on by, and applies to, people who are not and have no reason to become legal experts. It is simply a statement of the rules by which we try to live.

If laws were written in code, they would actually become much, much harder to understand than they already are for the vast majority of their audience. Imagine a public debate about a law where the text of the law was, instead of plain(ish) English, Haskell code. Imagine news anchors explaining that Biden agreed to add the lambda sign, but was heavily criticized by McConnell for his use of a monad instead of a plain for loop.

Re: CatalaLang/catala: Programming language for law specification

#152
post #89
post #43

Earlier quoted context omitted.

I partly like this idea in theory, but believe it is literally 100% impossible to come up with a better "test suite" than "the actual court system?"

Yeah, there’s no way that a modern computer could outdo the logical accuracy and processing power of our 300 year old legal system. Court rooms and arguing and paperwork, much more efficient than silicon.

Courts and lawyers are efficient at generating large pay checks for lawyers.

They are horrible at everything else.

Re: CatalaLang/catala: Programming language for law specification

#153

Earlier quoted context omitted.

The words almost always mean almost exactly what they mean in plain English. That’s why the law is a huge mess. As a fun exercises, try to find how many definitions of “child” there are in the US law and how many times it’s used undefined.

I don't agree that the law is a huge mess. It is certainly far less of a mess than any code base I've ever seen, given the gigantic scope of what it applies to, and how many people if affects. Note that the legal system is indeed a huge mess, but that happens because of many other reasons - not a problem with the wording or vagueness of the law, but with the explicit (malicious) intentions of law-makers, judges, poli…

> ..and how many times it’s used undefined

This is the real advantage of codifying law into a programming language. You can have validation and assertion that is automated. And a strict structure, free from ambiguity.

As an additional advantage, multilingualism becomes more accessible, with the codified program/definition acting as the lingua franca of law. Thus, someone who only knows English could make sense of Japanese laws by reading it.

Re: CatalaLang/catala: Programming language for law specification

#154

Earlier quoted context omitted.

This is quite a misunderstanding of how the law actually works, probably enhanced by lots of lawyer TV emphasizing obscure wording tricks. In reality, laws are already written in a relatively normal language, and the words almost always mean exactly what they mean in plain English. The only problem is that the legal concepts they describe are themselves complex, and often they end up in a tangle of references to othe…

I think this is a big part of it. My sense (as a non-lawyer who has looked at a fair number of laws and contracts) is that, in addition, there are plenty of laws and contracts that are just poorly written and wording or constructions that lawyers have retained out of caution or traditionalism. This last case, traditionalism and caution, is maybe a special case of the other cases, but it's not always obvious.

I worked for a company that translated certain kinds of legal contract into what was effectively a DSL. They could then be represented in a simplified way. That was the whole business.

The CEO (a lawyer) claimed that the lawyers who wrote these things would deliberately and unnecesarily overcomplicate them so that they could maximize billable hours.

I think they could quite easily have been templated using a DSL but that DSL would need frequent maintenance. These types of contracts did evolve as new types of clauses and legal constructs popped up and gradually evolved from "new" to "standard" to "boilerplate".

Re: CatalaLang/catala: Programming language for law specification

#155

As someone who speaks Catalan, I find the name collision with the language referred to in the article most unfortunate.

Why unfortunate? Also, I love your username. I think many of us could have guessed that you spoke Catalan from that alone ;).

Re: CatalaLang/catala: Programming language for law specification

#156

Earlier quoted context omitted.

I don't agree that the law is a huge mess. It is certainly far less of a mess than any code base I've ever seen, given the gigantic scope of what it applies to, and how many people if affects. Note that the legal system is indeed a huge mess, but that happens because of many other reasons - not a problem with the wording or vagueness of the law, but with the explicit (malicious) intentions of law-makers, judges, poli…

> ..and how many times it’s used undefined This is the real advantage of codifying law into a programming language. You can have validation and assertion that is automated. And a strict structure, free from ambiguity. As an additional advantage, multilingualism becomes more accessible, with the codified program/definition acting as the lingua franca of law. Thus, someone who only knows English could make sense of Jap…

Why would you want every law that applies to children to explain what a child is? Why stop at child, perhaps each law should include a definition of every word it contains, right? That would certainly make every law much more readable for the masses.

The text of the law is meant to be understood by the people that it applies to, i.e. everyone living in the locality which passed said law. Expressing law in a formal language goes directly against that goal. Imagine if a EULA you get presented with, instead of being a wall of repetitive text, would be a wall of code with symbols you at best remember from some class you took in 8th grade.

Re: CatalaLang/catala: Programming language for law specification

#158
post #3

The Catalan language name is written Català.

It is named after a French guy called Pierre Catala, not the language. Probably the name comes from the language but according to the documentation does not seem to be with acute accent. > The language is named after Pierre Catala, a professor of law who pionneered the French legaltech by creating a computer database of law cases, Juris-Data. The research group that he led in the late 1960s, the Centre d’études et de…

Their research group is called 'Prosecco', and another of their projects at Inria is 'Squirrel'... Another one is F* (pronounced F star).

I imagine that they find their naming choices amusing.

Re: CatalaLang/catala: Programming language for law specification

#159
post #154

Earlier quoted context omitted.

I think this is a big part of it. My sense (as a non-lawyer who has looked at a fair number of laws and contracts) is that, in addition, there are plenty of laws and contracts that are just poorly written and wording or constructions that lawyers have retained out of caution or traditionalism. This last case, traditionalism and caution, is maybe a special case of the other cases, but it's not always obvious.

I worked for a company that translated certain kinds of legal contract into what was effectively a DSL. They could then be represented in a simplified way. That was the whole business. The CEO (a lawyer) claimed that the lawyers who wrote these things would deliberately and unnecesarily overcomplicate them so that they could maximize billable hours. I think they could quite easily have been templated using a DSL but…

The text of a contract can either be long and very explicit, or short but full of implicit assumptions. A DSL is the second kind: you encode those assumptions I the structure of the DSL and the text as written is based on all of those assumptions.

The problem than becomes that anyone who wants to understand the contract now has to read not just the contract as written, but also all of the definition of the DSL itself. This can actually be OK if the DSL is very commonly used, such as a DSL for contracts between two parties which sign new contracts every day.

But it is a huge waste of time for parties which rarely sign contacts, and is often used as an explicit moat to keep laymen from participating. If I give you a contract to sign that isn't even written in plain English, you will have no choice but to hire a lawyer specialized in understanding this contract DSL to advocate for you.

I imagine (savvy) lawyers actually love DSLs that purport to make contracts concise.

Re: CatalaLang/catala: Programming language for law specification

#160

For years I've tried to convince my lawyer friend that something exactly like this would be great to have, and then it turns out to have existed probably all the time. I think this is truly awesome. Every law should be written in a language like this, and presented publicly with syntax highlighting and consistent formatting rules. Then it should be made part of the school curriculum to learn the law language. I belie…

This is quite a misunderstanding of how the law actually works, probably enhanced by lots of lawyer TV emphasizing obscure wording tricks. In reality, laws are already written in a relatively normal language, and the words almost always mean exactly what they mean in plain English. The only problem is that the legal concepts they describe are themselves complex, and often they end up in a tangle of references to othe…

I don't know if what you say about laws is correct, but it's certainly not a correct description of contracts. The general public is constantly confronted with utterly unreasonable legal documents: far too long, far too unclear, far too complex. The lawyers writing these, and the entities paying them, both know that the public will never read or understand them. It's pure cinicism.
Post reply on HN