← Back to context

Comment by jeppester

3 years ago

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 believe it would greatly improve everyone's ability to read laws and be confident about their understanding of them, which would be a huge boon for society.

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 other laws and regulations and legal precedent etc.

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

    • You (as a software engineer or similar) have been trained to read the 'more structured format' you'd prefer; lawyers have been trained to read 'prose'.

      Don't get me wrong I'd prefer it too, I just recognise it's a consequence of my own education and experience, and if we somehow flipped the switch overnight most lawyers would be completely baffled and pining for the much clearer old way.

    • The US Code is divided into numbered titles, sections, paragraphs and subparagraphs which can link to and incorporate each other by reference. This tree structure is reflected in typographic conventions which visually distinguish operative provisions from headings, indices and editorial notes. Isn't this the same kind of "structured format" as a code repository made up of libraries, modules, source files and functions?

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

    • But all structured format use words, and they're many programming language that are prose since COBOL. No one want to write laws in APL or assembly like.

      1 reply →

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

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

      10 replies →

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

      Which is why it is the common standard in German law to define every possibly unclear term either in the relevant section of the law itself or in an introduction article.

      1 reply →

    • 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, police and others involved in the whole process.

      For your example of "child": how often does it actually cause a problem in practice? How many people have been improperly punsihed/set free because of a poor interpretation of the word "child" in a specific law? This is far more relevant than every law taking up valuable space to define what such a common word means.

      12 replies →

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

    It's not that I think those laws are written in legalese, it's that they are expressing logic in a suboptimal way. Like how "four plus four equals eight" is a suboptimal way to express what could be expressed with 4+4=8.

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

      4 replies →

  • 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 believe that another thing that happens, and it is common in every field, is that certain constructions are very common within the field, and so the need arises among practitioners to shorten them. Most domains invent new words, but this doesn't work for laws and contracts (since they need to at least in principle be understandable to non-practitioners, such as most elected officials).

      So instead of full-on jargon, legal texts get enshrined phrases, which practitioners can essentially skip over, but which also retain some meaning in plain English (though often sounding antiquated).

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

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

      5 replies →

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

  • As someone who has tried to read the Black’s law dictionary once, I must tell you that the law does use a lot of formal language.

    • It does, to some extent, but it's still much closer to natural language than code. Expressing the law in code would turn this dial up to 11 and then some.

      3 replies →

  • Then you should be able to tell us what defrauding someone of their intangible right of honest services encompasses :)

    • Is that supposed to be very complex legal language? I'm not sure if this is some reference I'm missing, but it sounds relatively simple to me: it seems to be an accusation that someone is providing services dis-honestly (i.e. hiding some aspect of how the service will be performed or how much it will cost).

      The full scope of what that encompasses is very hard to know, as it depends on essentially every other regulation and common law practice and precedent that applies in the particular legal jurisdiction (and which jurisdiction that is can itself be a somewhat thorny issue).

      But this problem isn't solvable by code. It's part of the intrinsic complexity of the legal system.

Although in principle I agree with you, the law generally depends too much on interpretation and precedent to be expressed and understood like you’re hoping for.

  • That information should be available in summarized anonymized form, referenced from the law language.

    The judiciary should keep it up-to-date.

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

  • Am actually working on a project like this. Not quite to the level of insanity you're thinking about, but certainly a couple of thousand years.

A big problem is you lose all the case law that interprets the law. Like discarding two centuries of bug reports and patches.

At the same time, laws have been codified (i.e. the case law rewritten coherently, combining all the patches combined), such as the Uniform Commercial Code.