Hacker News new | ask | show | jobs
by JohnBooty 1616 days ago
Ideally: sure!

In reality: are you a software engineer? Or do you know one? Surely you (or they) have experienced how difficult it is to write code that manages even a small number of inputs? Even 10 different yes/no inputs give you 1,024 possibilities.

Now imagine writing laws to precisely cover an effectively infinite number of possibilities, many of which don't exist at the time the law is written, and expecting the laws to cover these new situations and variables with absolute certainty and unambiguity. And unlike software, you can't just push a commit to prod to fix the problems as they pop up. It's a really long process, because democracy.

It's not happening, no more than you'd be able to handle a piece of software that took some infinite and random number and variety of inputs and did something useful with them.

We should, as you say, write "quality" laws to the best of our ability but there will always been a sizable human element to the interpretation of law.

1 comments

An interpreter tries to understand what your code means. It doesn't try to guess at your intentions. (Pedantically, some do, but on a limited scale.) You should write quality code. You should try to anticipate edge cases. Your code will fail sometimes. You'll fix it.

Law has the advantage of much more advanced interpreters; but judges should still be interpreting the law, not guessing at the minds of the people who wrote the law. Lawmakers should be writing quality laws and fixing problems.

     Your code will fail sometimes. You’ll fix it.
That isn’t isn’t remotely how passing laws in a democracy works. I can push a fix to prod in minutes (or in the worst case, days) and it rarely if ever affects peoples’ lives in the way that laws do.

In contrast, passing new laws and updating existing laws is (by design) an arduous process in a democracy. There are things that can and should be improved about the ways that we accomplish this, but it will never be (and really shouldn’t be) fast and easy.

Sometimes I just want to ignore HN entirely because of embarrassing comments like this. “Code works this way, so everything should work this way!”

You're being unnecessarily rude.

I never said the law worked exactly like code. I used your code metaphor to explain my point in language you might understand.

Apologies for the tone. You're right to call that out.
Yes, you should try to write quality code.

Yet almost everyone fails.

You should also try to write quality laws. But when you fail, do you want the same sort of consequences as with code? How much time, effort, and money has been lost to hacks taking advantage of errors in code?

I would love an interpreter/compiler/processor that knew that I didn't intend to allow a security vulnerability so anyone could escalate their privileges. Sounds great, truly.

Unspecified behavior[1] is used in programming language standards for a very similar reason: to provide the freedom to interpret in the, uh, spirit of the code, rather than the letter, when it would be overall beneficial.

[1] https://en.wikipedia.org/wiki/Unspecified_behavior

That is a source of bugs and a known failure of crypto that try to consider the code as authoritative. If interpreters could figure out the intended behaviour, there'd be fewer or no bugs.

Lawmakers shouldn't be focused on bugs in written law, they should be working on new law

Law isn't code and it isn't crypto.

Judges aren't the only interpreters of law. They're simply the authoritative ones (ultimately). The law needs to be relatively authoritative so that people can make decisions around it. The whole process is actually a lot messier than such statements and there are usually valid arguments and evidence, but in general we should err on the side of least harm: which means if a law is poorly written, people might get away with something lawmakers wanted to stop. This can, and has, happened, and lawmakers deal with it by updating the law or crafting new ones. (Of course, I also think there is a distinction between the 'intent' of a law and what lawmakers intended and I really only object to basing decisions on the latter.)

Why? Because if an interpreter screws up, we update its code (or ours); but if a person screws up, we throw them in prison or fine them potentially devastating amounts. A person ought to be reasonably secure in acting in accordance with the law.