Architecture and Hardware Viewpoint

Understanding Law and the Rule of Law: A Plea to Augment CS Curricula

Why law matters for computer scientists and other folk.
  1. Introduction
  2. Legal Research and Computer Science
  3. Law and Computing Systems
  4. Jurisdiction
  5. If You Cannot Disobey a Law, It Cannot Be Law
  6. The Binding Force of Law, Code, and Ethics
  7. References
  8. Author
  9. Footnotes
law books

Some people think they are above the law. In a constitutional democracy this cannot be the case. Neither the head of state nor the doctor or the police are above the law. They should all be enabled to do their work, but we do not buy the claim that they could act as they wish. In 18th century Europe we replaced the authoritarian rule by law with a rule of law, to mitigate uninhibited power, and to ensure that those in power can be held to account in a court of law. Whereas rule by law is rule by persons (law as an instrument of control), rule of law implies a division of powers where those who enact the rules do not get the last word on their interpretation.13

This also refers to the difference between law and ethics. Replacing rule by law with rule of law means we do not want to depend on the ethical inclinations of those who rule us. Instead, we can send them home if we don't agree with the rules they impose (democracy) and we can contest their interpretation of those rules in court (rule of law). As a thought experiment I ask the reader how this would apply to the rules computing systems impose: Can we send home the developers (and/or those who implement these systems to gain a profit or to engage in public administration)? Can we contest their rules in a court of law when they impact our choice architecture?

Law and the rule of law have been implemented by way of intricate checks and balances that safeguard the contestability of legally relevant decision making, thus preparing the ground for robust, legitimate, and binding decisions. This is how we create and sustain societal trust: not by cherishing the illusion of an ideal world where power plays no role, but by creating and sustaining countervailing powers. Simultaneously, law is about coordinating human interaction, making sure that governments treat their citizens with equal respect and concern,5 thus providing for legal certainty and justice. That is why it is imperative that nobody is above the law.

This also goes for the architects of our computational environments, who increasingly design and engineer the space we inhabit. Computer scientists, Web developers, roboticists, and software engineers must understand both when and how the law applies to them, and insofar as they develop modules, systems or applications for specific use cases, they should be sensitized about how and when the law may apply. This goes for issues of privacy and data protection, cybercrime, intellectual property rights and private law liability (for example, tort), but also for issues of jurisdiction (what law applies) and international law (how national legal systems interact at the global level). It goes even more for the idea of the rule of law that should inform our understanding of the law.

Based on many years of teaching law to master's students of computer science,8 I have come to believe that by teaching them about law I am not only helping them to comply with current law, but also offering them a unique opportunity to engage with the foundations and implications of their own 'trade' (precisely because computing systems also produce rules that affect human behavior).

I have noticed students' intuitive understanding of complexity (developed while studying the behavior of computing systems) provides them with unique analytical skills that are surprisingly relevant for the study of law and the rule of law. Obviously, computer scientists are more aware of the limitations of formalized systems than others, making them open to what law has on offer as a complex, multidimensional, adaptive operating system.

In this Viewpoint I hope to explain why law and computer science have much in common, as well as much to learn from each other. Basically, I will argue that an introduction to law and to the rule of law should be integrated into the curriculum of computer science, considering the huge impact of computational systems on our shared world.

Back to Top

Legal Research and Computer Science

Computer science is about the design and behavior of computing systems, including their verification, grounded in mathematics, information theory, statistics, electrical engineering and often including the study of computational game theory, complexity theory, and cognitive theory, as well as cybernetics, the theory of programming languages, and much more. Hopefully it is also about the falsification of testable theory that contributes to scientific research.11

Computer scientists are more aware of the limitations of formalized systems than others, making them open to what law has on offer as a complex, multidimensional, adaptive operating system.

Legal research is about the interpretation and development of positive law; that is, the architecture of binding legal norms that define a specific jurisdiction, thus ensuring alternative interpretations can be argued, and safeguarding the integrity of law and the rule of law.5,8

Computer science concerns code that decides the behavior of a system, depending on specified inputs; legal research concerns a specific type of norms that decide what legal effect follows when certain conditions apply. Legal norms can be both written or unwritten, but in both cases they are expressed in natural language. Law is text-driven. Computing systems are code- (and possibly data-) driven.

Back to Top

Law and Computing Systems

This is where things become interesting. For computing systems it is crucial to remove ambiguity, for law it is crucial to sustain the open texture of human language while still ensuring closure.6,7 The beauty of 'natural' language is that it simultaneously opens a space for multiple interpretations of the same word, sentence, paragraph, or larger text body, and provides the means for the closure that is necessary to achieve mutual understanding.

This closure, however, is never final as it can always be called into question, for instance, by using language in a different manner, by connecting terms with previously unconnected terms or by creating references to new events or situations. The latter is interesting, because human language not only refers to objects such as chairs and tables, bridges and highways, but also to objects such as 'marriage', 'religion', or 'economic markets' that are neither given nor tangible in the way that, for example, rivers and canals are. Those objects are the result of performative speech acts that 'do what they say.'1,10 When a civil servant declares a couple husband and wife, they are not describing a situation but calling it into existence, with all the (legal) consequences this entails.9

This type of performative speech act abounds in the law, where lawyers are trained to determine what factual circumstances 'count as' a specific legal fact, and subsequently, to determine the specific legal effects of the relevant legal fact. To achieve such determinations, a lawyer will first investigate under what jurisdiction the problem falls.

Back to Top


For instance, a lawyer may have to determine whether a specific action 'counts' as 'unfair', meaning that they have to elicit the relevant legal conditions and check whether they apply, based on the relevant facts. The legal requirement of 'fairness' returns in many different jurisdictions and is part of many different legal domains (decisions of public administration must be fair, punishment must be fair, compensation for breach of contract must be fair, recruitment of employees must be fair). Lawyers are accustomed to the fact that fairness is not a predefined notion and has different meanings, depending on the legal domain and the case at hand. Deciding its meaning requires them to answer a series of very specific questions, such as 'fair compared to what' (what type of cases should be considered the point of reference), 'fair compared to whom?' (which others should be treated equally), and 'fair in respect of what?' (of a private or a public interest). The answers to those questions will have legal effect, they are not part of a thought experiment or a model building exercise. They will affect real people in the real world, depending on the relevant jurisdiction.

Computer science concerns code that decides the behavior of a system, depending on specified inputs; legal research concerns a specific type of norms that decide what legal effect follows when certain conditions apply.

Take, for instance, the judgment of the Court of Justice of the European Union (CJEU),a which concerned unisex rules on insurance premiums and benefits, and was based on the legal prohibition to use 'sex as an actuarial factor'. This legal prohibition meant that such usage 'must not result in differences in premiums and benefits for insured individuals': even though the driving behaviors of men was statistically more risky, the Court concluded the insurance company was not allowed to charge men a higher premium. Considering the fact that many other factors may function as a proxy for 'sex', this case is highly relevant for risk assessments based on machine learning. The decision, however, is only applicable within the jurisdiction of the EU. We are not in the realm of universal rules on fairness, which actually do not 'exist' in the real world. Neither in ethics (where disagreement abounds), nor in law (whose validity is restricted to a particular jurisdiction).

Other than the envy-free cake cutting algorithm, discussed in a previous issue of Communications, lawyers cannot abstract from real life implications based on invalid assumptions. For instance, we cannot assume agent 1 will be able to find a division with equally preferred slices of cake, nor can we assume that agent 2 would not have preferred another initial division (noting that many different initial divisions are possible). On top of that lawyers, economists and politicians may observe that once an envy-free division has been realized, the incentive to enlarge the cake could be lost—diminishing the appetite for innovation. Finally, the assumption that envy rules the world is simply one way of framing the problem. The assumption is utilitarian (preference based), and grounded in a particular kind of methodological individualism that may not hold. Utilitarianism does not necessarily provide for the best way of understanding the notion of a fair division (and fairness is not per se about division). Law is pragmatic and refrains from determining what is 'fair' in any universally valid sense, limiting itself to the question whether a given state of affairs should be qualified as 'unfair', depending on the relevant jurisdiction.

The latter refers to the fact that the legislature and the courts of a particular state or supranational organization determine what counts as unfair within that jurisdiction. What counts as unfair also depends on the legal domain (criminal law is about desert, prevention, deterrence; private law is about compensation, autonomy, property; administrative law is about the public interest), and on the particular circumstances of the case at hand. There is no algorithm for deciding what counts as fair, it requires judgment rather than calculation. An algorithm would forever lag behind what is relevant, trained on historical data or framed by code written on the basis of previous events. The situated nature of (un)fairness implies that lawyers are familiar with many of the issues that 'fair computing' struggles with, they are used to the fact that deciding the meaning of (un)fairness is an act of interpretation rather than the outcome of a calculation.

It is pivotal that computer scientists come to grips with the architecture, the multidimensionality and the constitutive force of law.

However, lawyers could learn lots about their own blind spots by taking note of the myriad interpretations of fairness that have been detected by machine learning experts,3 while the latter could learn lots about the myriad considerations that lawyers take into account when determining what 'counts as' (un)fair. Legislation and case law provide for an especially rich resource of granular decisions of the meaning of 'unfair' or 'fair'. Those decisions have force of law within a specific jurisdiction, which may be national but also international (for example, human rights treaties). This highlights the fact that concepts such as fairness do not lend themselves to universal interpretation, as a computer scientist may be tempted to believe. Law, instead, takes into account the history, values, and cultural background that grounds a jurisdiction. Simultaneously, even at the level of transnational jurisdiction, there are limits to what qualifies as fairness. Taking cultural settings into account does not mean that anything goes. This suggests a family resemblance between different interpretations rather than a set of necessary and/or sufficient conditions.

Back to Top

If You Cannot Disobey a Law, It Cannot Be Law

In the meantime, the fact that law can be disobeyed is often presented as a drawback. This is, however, not a bug but a feature. The law appeals to the agency of those under its jurisdiction, it does not self-execute or twist their arm. In the latter case, we would not speak of law but rather of administration, discipline, or brute force.4 Clearly, those who disobey the law may find themselves up against law enforcement: they may have to pay damages, or fines, or they may even be punished. This is where law differs from ethics. Following the law is not a matter of individual preference or personal taste: nobody is above the law. Nevertheless, in a constitutional democracy, law enforcement leaves room for contestation (due process, a fair trial), treating those under its rule as agents capable of giving reasons for their actions, thus respecting their dignity.12

Back to Top

The Binding Force of Law, Code, and Ethics

Defining law is like nailing a pudding to the wall, legal historian Uwe Wesel once wrote.14 The same goes for all human institutions, such as 'marriage', 'universities', 'corporations', 'religion', or 'economy', 'artificial intelligence', and even 'computer science'. This, again, is not a bug but a feature, as it enables us to navigate our shared institutional world in a reasonably smooth way—institutions are adaptive without being altogether undefined (one could say they are underdetermined). What differentiates law from ethics is neither brute enforcement nor mechanistic application of rules that speak for themselves, but a complex web of binding norms, enforceable decisions and dedicated institutions that empower and protect human agency as well as societal trust.

It is pivotal that computer scientists come to grips with the architecture, the multidimensionality, and the constitutive force of law. Designing computational systems 'to do good' is not enough. The end users of those systems should not be dependent on the ethical inclinations of individual developers, when confronted with an environment that is soaked in computational infrastructure. Before engaging with the ethical implications of such infrastructure, computer scientists must urgently be trained in both the theoretical underpinnings and the practical affordances of both law and the rule of law.

    1. Austin, J.L. How to Do Things with Words. Oxford University Press, Oxford, 1962; https://bit.ly/3ttf8rH

    2. Aziz, H. and Mackenzie, S. 2020. A bounded and envy-free cake cutting algorithm. Commun. ACM 63, 4 (Apr. 2020), 119–126; https://bit.ly/38NJe1g

    3. Barocas, S., Hardt, M. and Narayanan, A. Fairness and Machine Learning. 2019; https://bit.ly/3cN0Qf8

    4. Brownsword, R. Rights, Regulation, and the Technological Revolution. Oxford University Press, Oxford, 2008.

    5. Dworkin, R. Law's Empire. Belknap Press, Cambridge, MA, 1986.

    6. Hart, H.L.A. The Concept of Law. Clarendon Press, Oxford, 1994.

    7. Hildebrandt, M. Radbruch's Rechtsstaat and Schmitts Legal Order: Legalism, legality, and the institution of law. Critical Analysis of Law 2, 1 (2015); https://bit.ly/30QQyEX

    8. Hildebrandt, M. Law for Computer Scientists and Other Folk. Oxford University Press, Oxford, New York, 2020.

    9. MacCormick, N. Law as Institutional Fact. University of Edinburgh Press, Edinburgh, 1973.

    10. Searle, J.S. Speech Acts: An Essay in the Philosophy of Language. Cambridge University Press, Cambridge, U.K., 2011.

    11. Van Rooij, I. and Baggio, G. Theory before the test: How to build high-verisimilitude explanatory theories in psychological science. (2020); https://bit.ly/2Nvapqm

    12. Waldron, J. The rule of law and the importance of procedure. Nomos 50, (2011), 3–31.

    13. Waldron, J. The Rule of Law. In E.N. Zalta, Ed. The Stanford Encyclopedia of Philosophy (Summer 2020), Metaphysics Research Lab, Stanford University (2020); https://stanford.io/3157zeZ

    14. Wesel, U. Frühformen des Rechts in vorstaatlichen Gesellschaften. Umrisse einer Frühgeschichte des Rechts bei Sammlern und Jägern und akephalen Ackerbauern und Hirten. Suhrkamp, Frankfurt am Main, 1985.

    a. CJEU, 1 March 2011, Case C 236/09 (Test-Achats), at 30.

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More