Hacker News new | ask | show | jobs
by liscovich 4699 days ago
Do you know of any examples of actual legal documents written in Lisp, or some other formal language?
1 comments

haha, no. It was meant as a quasi-joke. I'd like to see one though.

Certain laws are very cut-and-dry (speeding for instance) and perhaps laws could be proven on a functional basis.

You could even make it axiomatic from the constitution and declaration of independence.

Of course, you'd need to define the axiomatic meaning of things like 'the right of the people to keep and bear arms shall not be infringed' - which is hard to do even with such simple language.

And then after loading the axioms, you'd spend a lifetime going through errors in the existing laws.

Certain laws are very cut-and-dry (speeding for instance)

Ha! No.

* do you want to give an exemption for speeding for, say, ambulances? So how do you define "ambulance"? Do you have to be registered to drive an ambulance? What defines the "duty of an ambulance" (or are they allowed to speed no matter what). What about a van carrying an organ to be donated?

* What if I have my sick child in the car and I'm rushing them to the hospital because it's faster than waiting for an ambulance? Is it right that I can be arrested and convicted for that? I think that would be a perversion of the spirit of any just law.

* What if I'm being chased by a maniac relative who wants to kill me? Can I speed then to drive away from them? Do I have to believe my life is in danger? How do you define that?

* Let's pretend I'm driving along and some other vehicle is about to move into my lane and crash into me because they are stupid and don't see me, and let's pretend that if I speed up a little bit (over the speed limit) and am able to get in front of them and avoid an accident. Should I be convictable for speeding even though I sped to prevent an accident?

Sure, these are all edge cases and there are loads of cases where it is clear cut, but you have to write a law that can handle the edge cases. Without accepting the vagueness of human life, you'll wind up with an unfair conviction that is horrible.

Or, alternatively, you can write the law simply and let people decide for themselves if it's worth breaking.

So, no exemptions for anyone, but then part of the cost of running an ambulance service is paying speeding fines regularly. Given the cost of ambulance services without that, the additional expense is lost in the noise, making it obviously a good choice to speed when useful (for ambulances).

Trying to figure out after the fact whether someone had a good reason to break the law (and therefore shouldn't be penalized) is one of the things that complicates legal systems enormously. Instead, we should write the law clearly and specify the penalties for breaking it directly, and let those who have the best information about the situation, the potential lawbreaker(s), choose whether it is worth breaking the law in a given instance.

And if speeding repeatedly banned the driver from driving, then you'll run out of ambulance driver after a day.

Or let's put a man in jail because he break the law three times (even if all those cases would be exempted in current system).

The whole point of the proposed system is to capture all the downside of a given action in a single penalty. Therefore, escalations based on repeated actions wouldn't make any sense.
Some countries do a "penalty points" system where you get (say) 2 points if you're speeding, and if you get (say) 12 points, you're off the road for (say) 2 years. Your proposal of "let people break the law" means that you'd run out of ambulance drivers.

You then have the problem of whether someone can be fired as an ambulance driver if they don't speed. Many countries employment law says that you can't fire someone if they refuse to break the law for the job. So what happens there?

Yes, if we changed the laws, laws would be different.

I'm not suggesting that laws should be passed that work this way within a framework that assumes they don't. The solution to a mountain of bad code is not to add another layer that tries to make huge changes; it's to rearchitect. I also understand that this isn't going to happen in a large existing system like the US; I think it's a better way, but there's no easy, incremental path from here to there.

As for your hypothetical: In this system, since the vast majority of penalties would be monetary, or have monetary equivalents, and since the entire damage is (supposed to be) captured by the penalty, ambulance companies would come up with their own rules under which they would pay fines on behalf of their drivers, contractually. The market could then correct via abuse of those rules by the driver, or refusal of drivers to work for that ambulance company, depending on which way the rules erred.