The phrase Code is Law (Lessig, 1999) captured the realization that software systems regulate behavior as effectively as statutes or markets. But *Law as Code* is a different move: it asks not simply whether code governs, but whether **law itself should be expressed, drafted, and executed as code**. This jurisprudential shift reframes legislation, regulation, and contracts as computational artifacts.
- Lexon
# Historical Glimpses - Lex Informatica (Reidenberg, 1997):** Technical standards shape flows of information and thus serve as a kind of law. - **Code is Law (Lessig, 1999):** Software architectures constrain action like legal rules do. - Smart Contracts (Szabo, 1990s):** Enforceable promises embedded in executable code. These provided intellectual soil for today’s *Law as Code* approaches, but they emphasized narrative and critique more than systematic translation of law into executable form.
# The Jurisprudence of Law as Code 1. From Text to Computation Traditional law is expressed in **natural language**: flexible but ambiguous. *Law as Code* insists that rules can be written in **formal, executable languages**: - Machine-readable rules reduce interpretive ambiguity. - Computation reveals hidden contradictions or omissions. - Citizens, lawyers, and machines can all evaluate obligations consistently. 2. Legality, Legibility, and Legitimacy Legal theorists worry about three tensions: - **Legality:** Does machine-execution preserve the law’s authority, or replace it with technocracy? - **Legibility:** Can non-specialists understand rules once codified in formal syntax? - **Legitimacy:** Who decides the authoritative code—legislatures, agencies, or technologists? 3. General Rule / Exception Structures Many laws have a **default rule with numerous exceptions** (e.g. “income is taxable unless exempt”). Traditional programming struggles here; novel legal DSLs (like **Catala**) explicitly model rule/exception hierarchies to stay faithful to juristic reasoning. 4. The Jurisprudential Claim Where *Code is Law* was descriptive (software governs), *Law as Code* is **normative**: - Law **ought** to be specified computationally. - Legal validity is partly achieved through **executable coherence**, not just text or precedent. - Interpretation shifts: courts may one day adjudicate whether a codebase faithfully implements statutory intent.
# Illustrations of Law as Code - **Tax & Welfare Calculators:** OpenFisca models tax-benefit systems; citizens can simulate outcomes directly. - **Domain-Specific Languages:** Catala encodes statutes with exceptions, uncovering drafting errors in French tax law. - **Visual Logic Tools:** Blawx allows drag-and-drop construction of legal rules, making them both machine-executable and human-auditable. - **Smart Contracts:** Blockchain systems instantiate private law as self-enforcing agreements, raising the question of whether “the code is the contract.”
# Relation to Policy as Code While **Policy as Code** architectures (e.g. OPA/Rego, Cedar, Sentinel) focus on enforcing *technical and organizational policies* in cloud systems, **Law as Code** extends the idea to the legal domain itself: statutes and regulations treated as executable specifications.
# Open Questions 1. **Interpretation vs. Execution:** How much discretion remains when laws are computationalized? 2. **Amendment and Versioning:** How does one “patch” the law while preserving continuity and precedent? 3. **Democratic Participation:** If laws are code, do citizens need new literacies to engage in governance? 4. **Judicial Review:** Will courts interpret *the code*, or the underlying legislative text?
# Conclusion *Law as Code* is not merely a technological project but a **jurisprudential proposal**. It asserts that law can—and perhaps should—be drafted, debated, and executed in computational form. This move shifts law from **narrative and interpretation** toward **specification and execution**, raising profound questions about authority, transparency, and democratic control.