Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

221–230 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#221

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…

IANAL but from my experience reading laws, they're written in a way that looks like it's trying to replicate programming-language-esque nested logic, but in prose format—instead of using physical layout to establish the relationships between concepts, they use words, which I find more confusing. I would rather read laws written in a more structured format.

If you read almost any state or federal statute, it's usually presented online in a tree format where definitions link to the defining article and referenced articles are hyperlinks to those sections.

It's all very readable.

Re: CatalaLang/catala: Programming language for law specification

#222

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.

A contract is anything two parties agree to with some consideration (benefit) exchanged. The law does not distinguish between 'proper' contracts and informal ones (like a handshake) except a proper one may be quicker to execute. And this is a feature... You wouldn't want to force everyone to undertake the cost of developing highly specialized legal products just to do business.

Re: CatalaLang/catala: Programming language for law specification

#223
post #212

Earlier quoted context omitted.

> 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 see how a language is going to solve this. This isn't really an issue of language, it's an issue with ambiguity in the very intent itself. That's why we have judges, who interpret that intent.

Indeed. Ambiguity in legal codes is a feature that allows them to remain relevant for more than a couple of years, and the formal-law "utopia" that some commenters here appear to desire would be a nightmare if put into practice.

Personally I'd rather have laws that work, are consistent and easily understood if you can follow 'if A then B' logic, even if they have to be updated more often.

Relying on ambiguity is admitting there are no laws, and we rely on the common sense of the people in thr judicial system.

Re: CatalaLang/catala: Programming language for law specification

#224
Although I agree on principle, the closest thing we have to 'formal law' are smart contracts, and already billions of dollars have been stolen from bugs in these, despite barely anyone using them. I have some reservations for basing our entire legal system on code.

Re: CatalaLang/catala: Programming language for law specification

#225
post #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.

This is less of a problem in legal systems as the legal system self admits to resting on unproven axioms.

Re: CatalaLang/catala: Programming language for law specification

#226
Ambiguity is a feature, not a bug. I used to spend a lott of time on business process automation, and even in those more structured and restricted settings trying to codify procedures most often fails. The reason is that reality has (a) so many edge cases that it very rapidly devolves into chasing down an ever diminishing ROI, (b) is unknown by the middle management and business analists, those that would have the authority to construct and sign off on it, and (c) relies on intelligent people applying creative pragmatic solutions to keep the business running and straightjacketing those into inflexible automatons is the most surefire way to sink the ship.

Re: CatalaLang/catala: Programming language for law specification

#227

Although I agree on principle, the closest thing we have to 'formal law' are smart contracts, and already billions of dollars have been stolen from bugs in these, despite barely anyone using them. I have some reservations for basing our entire legal system on code.

I think that comparison is way off.

Smart contracts are much more comparable to "a webshop", than actual logic describing rules of arbitrage or other concepts at play in "law".

Re: CatalaLang/catala: Programming language for law specification

#228
post #211

This project seems to implicitly assume that a formally specified code of laws, where statutes can be interpreted largely mechanistically, is a good thing (and by extension, that the existing system of human interpreters with discretion and margins of error is a problem to be overcome). I don't disagree with this assumption outright, but it's certainly not obvious to me that it is correct, and the authors appear to p…

Some laws, like tax bracket computation probably are fine but most laws should not be codified like this in my opinion

The French have a programming language for tax related work: https://github.com/MLanguage/mlang

Re: CatalaLang/catala: Programming language for law specification

#229

Laws would do well to follow the rules of software. Small modules with clear responsibilities with an emphasis on readability and test cases that are run before you go to prod, for example. Testing is expensive so I understand why the legal system would rather just push their code and fix bugs when they see them in the wild. The collateral damage for people caught up in real life test cases is tolerable, especially w…

Moreover I think laws work similarly to software. People wrote law, others find a loophole and use it, the people fix it with patches, and so on...

Re: CatalaLang/catala: Programming language for law specification

#230

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…

And the links! OMG, you could trace precedents and justifications and citations all the way back to the ur-utterances of Hammurabi. Reading that stuff could be quite educational.

Former R&D director of legaltech company here. Lawyers already use tools that link everything.

For instance in the U.S., the Westlaw search engine for legal cases is such a tool, it can parse legal citations and turns them into hyperlinks. It rankes cases given a query based on a state-of-the art machine learning based IR method, and it is aware of cases in the ranking that are currently overturned by higher courts (shown as red flags) or being reviewed (shown as yellow flags).

The software can also predict the outcome of a legal case and recommend courses of action that makes winning more likely. It includes ruling statistics about all sitting judges.

Curiously, lawyers like to see the world as static, they do not like e.g. search results to differ between sessions, but of course cases get decided dynamically every day, which must necessarily also change the search results for any given query.

If people want to see what is the state of the art in AI and the law, I recommend you have a look at "AI & the Law" (ICAIL, the annual conference and the journal of the same name).

Post reply on HN