4 ms·
I’d say that laws are closer to source code than bytecode. Because, like source code you can read them, edit them without converting to any other representation
by terminalcommand 6y ago
I’d say that laws are closer to source code than bytecode. Because, like source code you can read them, edit them without converting to any other representation.
Laws’ flexibility and interpretation comes from the ambigiuity of human languages and a need to adapt to circumstances.
The legal scholars recognized for a long time that you cannot predict and regulate every case, therefore laws generally set out principles you can fall back on, if you cannot find a specific regulation.
Therefore law is more like an ambigious declarative language with lots of undefined behaviour :). There are some agreed upon language standards and each lawyer/judge can interpret it.
As with source code, you include definitons, declarations, link documents. There are race conditions between legal texts. There is poorly written code and well written code.
For me the most obvious difference is that laws are computed and operated through people. As computers can’t interpret the sources, we have to. It is slow, error-prone but essentialy the same thing.
First step to improve this would be to publish all laws in a computer readable and parseable form. It saddens me that in my country amendments to laws are published in an official gazette as low-res formatted images.
- jka 6y agoIt looks like the Council of DC is taking some steps in this direction, with XML representations of their statutes and codes available on GitHub: https://github.com/DCCouncil/dc-law-xml https://github.com/DCCouncil/dc-law-xml And they do accept[1] pull requests apparently! [1] - https://arstechnica.com/tech-policy/2018/11/how-i-changed-the-law-with-a-github-pull-request/ https://arstechnica.com/tech-policy/2018/11/how-i-changed-th...
- terminalcommand 6y agoThis is incredible! Uploading all legislation to a repository and declaring it as the authoritative version is the way to go to enable progress. In Turkey, judges and prosecutors have access to a digital law database, but citizens and lawyers don’t. However, laws continue to be published in an online gazette. Most amendments, decrees etc. are published as low-res images. You cannot search them. The government doesn’t even bother publishing the full amendment text. They only state sentences like: “The second word on the sixteenth paragraph of the law numbered X was amended as Y.”. To find out about the amendment, you open the legislation, follow the instructions to get the latest version. There are third party publishers who follow these changes and sell memberships where you can see the latest code. The layman has to wait until the government publishes the text (unofficialy) and cannot do comparisons. It is a real mess. But the government here doesn’t want people to notice the changes, that’s why they bury these in small print. Public officials know the law, citizens have to work hard to get the latest text. I had law professors in college, who checked the legislation with printed copies of the state newspaper against the published version, because they were sceptical of the government’s unofficial legislation site. They suspected that the government may have been altering these texts. The constitution only protects the integrity of the text published in the official state newspaper. But as most people don’t have any other source these become the authoritive one. It’s really sickening. If there were a standardized format for all legislation (including the drafts), we could search easily, make comparisons easily etc.
- jka 6y agoAgreed, it could be much better worldwide. I'm a layperson certainly, but my understanding is that a lot of legal systems were/are intended in principle to be structured so that they are open to the public (in terms of access) so that they gain credibility and support from the communities they serve, and so that injustices can be debated and corrected. Regardless of what tech companies themselves aim to achieve, I think that software engineers on the ground tend to believe that making languages easier to understand, making codebases clearer and simpler, providing better tools to access and subscribe to changes and releases, and automatically spot problems (like the integrity issue you mention) are all beneficial. I believe we'll see more of those types of practices and abilities filter their way into legal systems; it could be disruptive and it shouldn't be done too quickly so as to avoid Chesterton's Fence[1]-type issues, but the upsides are clear and the blockers may largely be related to inertia. [1] - https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence
- cogman10 6y agoI'll still argue for bytecode (or at very least an IR of some sort, maybe an AST?) That's mainly due to the fact that the debate about the law and the text in a law can vary wildly. I'd call the inciting incident the "source" of a law and the written law an attempt by the compiler to capture the meaning of that source. An example is the ACA, which in principle was "Let's make sure everyone has health insurance" and in practice ended up with a humongous bill with all sorts of interesting parts. The human readable part of the law is usually the public debates around the law. The legalese that follows can be interpreted by some people but isn't generally written for the general public. These compilers tend to emit a lot of garbage along side the the bytecode. For example, the postscript on the DMCA talking about boat hulls of all things.
- terminalcommand 6y agoI’d agree that it could be classified as an IR. Law is definitely a domain specific subset of natural languages. Even more, each field of law can be regarded as another specific domain specific language. If you’re doing healthcare law, copyright law, criminal law etc. you need to familiarize yourself with the history, terms and mindset of that field. That’s why lawyers also specialize and that’s why years of training are needed. But my general opinion is, if something (a bill for example) looks much more complex than it should have been, someone engaged in lobbying to twist things in their favor. If law is left alone from personal interests, the resulting legislation are often more clear and understandable.