logoalt Hacker News

ivanjermakovtoday at 12:57 PM6 repliesview on HN

I'm surprised the world is not running a system where laws are formally encoded using some DSL that would allow making decision (guilty/not guilty) using formal logic. Perhaps there is not much interest from law making/enforcing parties for this either.


Replies

rrr_oh_mantoday at 1:00 PM

That's a common fantasy of developers who haven't touched grass in a while.

show 2 replies
rileymat2today at 1:04 PM

You’d also probably be surprised about how subjective and unevenly applied the law is… by design, to allow appropriate outcomes and discretion.

Edit: Consider the following words included in law.

“reasonable” “reckless” “due care”

bentcornertoday at 4:13 PM

I don't think this is where the problem lies. If you kill someone with intent, it's murder. But the whole system needs to prove that you killed someone with intent beyond a reasonable doubt, and a DSL will not help you there.

bonoboTPtoday at 2:17 PM

Have you actually tried reading a single law? If you have, have you tried to write just one article in formal logic?

Certain laws, like parts of tax law may be possible to turn into code, like percentages and deadlines, but even those often carry natural language conditions that can't be evaluated so easily. Seriously, try it.

gloosxtoday at 2:19 PM

Maybe we should go further and use some DSL to speak with each other in the first place? Would def make everything straight and eliminate ambiguity!

show 1 reply