Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

231–240 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#231

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.

This is a solved program in programming, you hover Child and hit "Go to definition". If it's ambiguous, the lawmakers would get a compile error instead of pushing a broken law. They may even have to pay us for consulting to fix it, depending on how esotrtic the language is, how nice is that!

Legal codes aren't meant to work like programming languages. It is impossible for a legislator to predict how the world will work when their law is applied, and it is highly unlikely that they will anticipate every situation and context in which their law will be invoked.

Judges and juries and lawyers all exist to help us interpret the inexact legal code in a way that is (hopefully usually; but obviously not always) fair and reasonable given the often-nuanced situations at hand.

Re: CatalaLang/catala: Programming language for law specification

#232

Will it help? On the one hand, I think it would be fantastic, if you had automated tests for the law. For example, when German politicians introduced the "hacker law", you could have pointed out that "This new law would break the 'security researchers need to be allowed to do penetration testing' test". On the other hand, "Brexit is in conflict with the Good Friday Agreement, we need a solution for Nothern Ireland."…

If you make a law against "test-breaking" people will just break that law.

Re: CatalaLang/catala: Programming language for law specification

#233

Earlier quoted context omitted.

> Additionally, the law is not supposed to be some arcane discipline that you need to learn a new language for. It would seem to me that reading laws has become an arcane discipline, partly due to it being expressed in a language with overly long sentences, which handles branches and references very poorly from a readability perspective. > Imagine news anchors explaining that Biden agreed to add the lambda sign, but…

I assure you that no one who fails to parse long sentences would get a better understanding from replacing those with code of all things. And if the actual text of the law consisted of coding symbols, I very much expect that (a) you'd have endless debates about the precise symbols being used, and (b) have to have anchors going over the meaning of those symbols and losing 9/10ths of their audience along the way.

You are mentioning symbols as a negative in a lot of your comments, but the language posted here is mostly using words and math operators.

Re: CatalaLang/catala: Programming language for law specification

#234

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…

How do you codify the effects of judicial review? What if the court's decision is not binding but is still persuasive -- such as when it's a decision from another jurisdiction?

Common law has like 800 years of tech debt. It's turtles all the way down. And by turtles I mean precedent, and not all of them are compatible.

None of what I've described is malicious. It's just what happens when law meets the messiness of the real world.

Re: CatalaLang/catala: Programming language for law specification

#235

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".

A smart contract is a well-defined series of rules, that anyone can choose to interact with and have certain well-specified guarentees of the outcome -- in that sense I think there are quite a few similarities, the main differences being that a smart contract deals with a way narrower set of concepts and is immutable.

Re: CatalaLang/catala: Programming language for law specification

#236
post #43

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…

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?"

I don't want me or my male family members to be labelled sex-offenders whilst you "test" the "court system" to see if the laws work as intended. All because some overzealous prosecutor wanted to be "tough" on "toxic masculinity".

Re: CatalaLang/catala: Programming language for law specification

#237
post #212

Earlier quoted context omitted.

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.

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

What's better:

- relying on the common sense of the people in the judicial system to interpret the intent of the law as it applies to a particular situation,

- or relying on the common sense of legislators to write a precise, unambiguous law that will cover all possible situations without negative unintended consequences, and without the law-writing process being influenced by spureous interests and pressures?

The answer highlight why the law is interpreted as is now, with a body of trained public servants analyzing the particulars of each situation, rather than by fanatics trying to follow the letter of the law.

Languages like this may help clarify the intent of legislators so that it is not twisted by clever lawyers; but a human reviewer should always check the relevance of one law to any particular case, and wether the text corresponds to the original intent as applied to a given situation.

Re: CatalaLang/catala: Programming language for law specification

#238

Earlier quoted context omitted.

This is a solved program in programming, you hover Child and hit "Go to definition". If it's ambiguous, the lawmakers would get a compile error instead of pushing a broken law. They may even have to pay us for consulting to fix it, depending on how esotrtic the language is, how nice is that!

Legal codes aren't meant to work like programming languages. It is impossible for a legislator to predict how the world will work when their law is applied, and it is highly unlikely that they will anticipate every situation and context in which their law will be invoked. Judges and juries and lawyers all exist to help us interpret the inexact legal code in a way that is (hopefully usually; but obviously not always)…

That doesn't add up with how the average piece of legal code looks. Even when I read a brand new piece of legislature it's an impossible soup of words, attempting to document every possible edge case the legislators thought of. If the point was to leave room for interpretation by a judge and you concede yoy don't have full context of how what you're writing will be applied, surely you could write much more sensible and human-readable text.

Re: CatalaLang/catala: Programming language for law specification

#240
I would have a much easier time understanding government legislation if everything was provided in such language. I tried to compute my taxes by hand a month ago to see whether and how much money it would save if I enabled "loon middeling" (some Dutch law about income). But I couldn't figure it out. The explanations provided were ambgiuous in some subtle way, leading me to incorrect assumptions. In the end I did figure it out by reverse engineering a free third party calculation tool (which also was not correct, but putting their insight and my insight together made something that came close to the number on my belastingaanslag).
Post reply on HN