> The law is an adaptive, dynamic system.

I think this is the key point that a lot of people (at least those with an engineering or similar background) overlook - the law isn't a fixed, prescriptive set of rules that are rigidly enforced[0]. It's a complex, evolving system that is constantly evaluating situations, re-evaluating old ones, and considering multiple 'soft'[1] factors that are near impossible to explicitly define. Designing a fixed set of rules to cover the same would quickly become a huge pile of edge-cases (arguably what caselaw already is), and you could never realistically hope to cover every situation.

Few examples of why I think such an approach is misguided (from English law):

1. R v R [1991] UKHL 12 - Until this case, there was the idea at common law that there is a martial exception to rape - a wife has essentially pre-consented to intercourse, and therefore cannot be raped by her husband. The House of Lords recognised that such an exception was no longer acceptable[2], and were able to overrule it without being bound by a fixed rule[3]. A more rigid legal system could have produced a worse outcome here by upholding the prior exception.

2. House of Lords Practice Statement [1966] 3 All ER 77 - Essentially a recognition of the above situation. The House of Lords declared that it, as a court of last resort, would no longer be bound by precedent if departing from it was in the interests of justice - "Their Lordships nevertheless recognise that too rigid adherence to precedent may lead to injustice in a particular case and also unduly restrict the proper development of the law."

3. Ruxley v Forsyth [1995] UKHL 8 - Ruxley was contracted to build a pool of a certain depth, but actually built it one foot shallower. If you take a rigid approach to the law, you likely end in one of two scenarios: there has been a breach of contract, therefore damages must be awarded OR no damages have been suffered (e.g. change to house price, functionality of the pool), therefore no award is made.

The Court in this case recognised that awarding the full cost of rebuilding would be unreasonable, and that there was no direct financial effect (e.g. change of house value) that would allow the award of damages. The Court however also recognised that the value provided by the contract may be non-monetary, and so made a partial award for "loss of amenity".

It is cases like these that make me think that designing a fixed set of rules to be rigidly applied will result in worse decisions being made. Certainly, there are some advantages to such a system (as recognised in the Practice Statement, it would provide a "degree of certainty upon which individuals can rely in the conduct of their affairs, as well as a basis for orderly development of legal rules"), but the individual nuances of cases are such that often they cannot be adequately considered until the event has taken place.

> I am sometimes bemused by the idea that bodies of law can be ignored or swept away by code.

I don't think it is a completely flawed idea though. I suspect a majority of cases currently handled by the lower courts COULD be handled by such a system, as many cases are fairly run-of-the-mill applications of established rules. I believe you would need to retain the upper courts of appeal though, for the reasons I outlined above. This of course brings in some wider considerations though, such of the costs related with such an appeal and ensuring access to justice for even the poorest members of society.

[0] Such a thing would of course be possible, but I doubt it would produce more fair/just decisions than the current system. More predictable (which is an important element of just decision making in its own right), but less able to adapt to new/unexpected situations.

[1] e.g. fairness, justness, broader social situations, good/bad faith

[2] "[W]here the common law rule no longer even remotely represents what is the true position of a wife in present day society, the duty of the court is to take steps to alter the rule [... I]t is the removal of a common law fiction which has become anachronistic and offensive"

[3] Of course, I expect that all fixed set of laws would be subject to change (e.g. by Parliament), but they do not have the ability to consider each event on a case-by-case basis and and interpret the law on the fly.