What is the general rule law professors teach in law school for determining whether something is allowed or not allowed, based on written law?

When I read any piece of legislation, I sometimes wonder if the politicians understand logic. I am a software engineer, not a lawyer. Which is probably a good thing, otherwise I'd be confused out of my mind. Law is definitely not a science, because there are so many conditions in written legislation that conflict with one another! So if a software engineer tried to develop software to make a decision for any situation based on written law, the computer would start smoking from confusion.

Is it safer to assume something is not allowed until you find enough evidence that it's allowed? Or is it safer to assume something is allowed until you find enough evidence that it's not allowed?

Or do you look at the beginning sentences of a given piece of written legislation, and use the rest of the written law as exceptions to the rule stated in the beginning?


In software, whatever condition is met first, that's the path chosen! So you can think of an order of precedence happening. Conditions/Laws at the top of the source code should be most specific, if they are identical conditions/laws found lower in the source code. But the order in which you read written law probably doesn't work that way?

condition 1: dog is black, dog is friendly ==> pet the dog

condition 2: dog is black, dog is mean ==> don't pet the dog

condition 3: dog is black, dog is friendly, dog is quiet ==> condition never met, because it's more specific than conditions above with same criteria, plus extra criteria

condition 4: dog is black, dog it friendly, dog is quiet, dog has fluffy hair ==> condition never met

  • 2
    "The life of law is not reason, it is experience." Common sense and experience, not consistency and logic, are the rule in law. Words don't always mean the same things in different places. Sometimes sentences mean something very different from what they actually say (see, e.g., the 11th Amendment). Without knowing the context and having the right expectations up front, you won't get the right answers. It is useful to think of statutes and rules as memory aids rather than a full set of code. Lots of the instructions are implicit.
    – ohwilleke
    Apr 3, 2018 at 5:23
  • 3
    Have you ever read an requirements document, even a simple one like FizzBuzz? "Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz"." If you look at how its worded, you will see that the ordering of the conditions and sentences is nothing at all like the source code you will write to conform to this specification.
    – Polygnome
    Apr 3, 2018 at 10:42
  • Best of luck translating laws from religious texts into mathematical form!
    – James
    Apr 3, 2018 at 11:12
  • Your yellow example is wrong, even in software engineering terms. You've assumed that there's an "else" between each "if", but that's not what it says. It's perfectly reasonable to say "If the dog is black and friendly, pet it. If the dog is black and friendly and quiet, feed it." If the dog is black, friendly and quiet, it gets petted and fed. Apr 3, 2018 at 11:24

1 Answer 1


The general rule is, anything is allowed unless it is forbidden (and not that you can only do things that are expressly permitted).

The logical structure of law may be a bit more challenging than procedural programming logic, since it may require a global knowledge and evaluation of the entire code (typically but not absolutely, the scope of the search for "unless otherwise" conditions is restricted to "in this chapter"). In other words, the law is a set of propositions which must all be true, and unlike actual execution of instructions in a sequence, law is to be interpreted simultaneously but hierarchically (that is: the order in which clauses are written is not significant). The appearance that the law is self-contradictory is largely illusory, though the resolution of the conflict may require a careful reading of the law and knowledge of jurisdictional hierarchy (federal law is superior to state law, which entails a particular resolution of the apparent conflict). Sometimes there are real conflicts, which usually result from using words in conflicting ways (note the practice of re-defining words "in this chapter/section/title").

The reason why law is not a science is that law is normative, not descriptive: it dictates what is allowed (a determination made through the political process), and does not attempt to discover what independently is. The reason why the legal process cannot be implemented in software is that software does not yet correctly interpret natural language, and law is written in natural language following interpretations based on judgments of what choices a reasonable would make.

Perhaps if you propose a piece of law that you think is contradictory, it would be possible to show how the contradiction is illusory.

  • 4
    Note that, if it turns out that two laws really do contradict, the newer one typically takes precedence; see implied repeal. Apr 3, 2018 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .