Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was about to respond until I realized your post was a Swift-ian parody so sophisticated as to be almost over my head. Well done.

But if we were going to try to reduce the complicated, inherently human, and uncertain concept of law to computer code, surely you'd agree that a declarative programming language would be a better choice. Something like:

prohibits_free_exercise_of_religion(X) :- unconstitutional(X). respects_establishment_of_religion(X) :- unconstitutional(X). unconstitutional(X) :- not_law(X).

Now, all you have to do is write Prolog code to test for when a law prohibits the exercise of religion or respects the establishment of religion!



You have your Prolog backwards.

  foo(X) :- bar(X).
means that foo(X) is true if bar(X) is true, not the other way around. So your code would indicate that anything that's not a law is unconstitutional, and anything unconstitutional prohibits free exercise of religion (for example).


oh! that explains why my Prolog hacking has been so unsuccessful. Thanks very much.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: