I think that this is the real problem in law- it's based on precedent which is almost like a crutch for poor specification.
For any one case you need to go back to the start of law to find every relevant ruling (delta) to get the full scope of a judgement.
Of course this isn't feasible in the main, so lawyers work off convention, which is implicit knowledge.
How is the layperson supposed to understand the law then?
It would be better if (in an ideal world) judges ruled on a case based only on the way the law is written, and then submitted amendments to the law based on a historical and current analysis.
In coding terms we're talking about a snapshot (the law itself) rather than every ruling prior to the current law (deltas).
The question is why are they not supposed to? - if I wanted to fit a boiler in my house, I could use a domain expert or learn myself.
How would a layperson understand if they are breaking the law if they don't understand it (I'm referring to nuances rather than out-and-out obvious transgressions)?
Your second point alludes to this problem - the criminal code has to be kept simple to be understood, I'd suggest the same aspiration for the rest of law. Understandably some of it will get complex, but overly byzantine structures in general can serve to obscure shadier practices, even as simple as job preservation.
As with coding, a certain amount of convention is a useful timesaver, but if you have to spend years learning just a subset of the conventions, then a rewrite seems in order.
I'm not sure what the state of play is with codifying law in some sort of computer-readable DSL, but I suspect it would be more than just slightly useful to do so.
This leaves aside any issues of the general approaches of each countries' law, and what they should entail. I'm just suggesting a possible way to simplify law by being better able to refactor it using advanced tools.
> it's based on precedent which is almost like a crutch for poor specification
It works for software. “Working software over comprehensive documentation ... Responding to change over following a plan ...” https://agilemanifesto.org/
For any one case you need to go back to the start of law to find every relevant ruling (delta) to get the full scope of a judgement.
Of course this isn't feasible in the main, so lawyers work off convention, which is implicit knowledge.
How is the layperson supposed to understand the law then? It would be better if (in an ideal world) judges ruled on a case based only on the way the law is written, and then submitted amendments to the law based on a historical and current analysis.
In coding terms we're talking about a snapshot (the law itself) rather than every ruling prior to the current law (deltas).