News for hackers. Stuff that matters.
Re:Beautiful law: how design can make law simpler, useful an... by rayiner on Monday January 26, 2015 @07:04PM (#8950482)
Law is written the way it for the same reason GCC's register allocator is written the way it is: http://gcc.gnu.org/wiki/cauldron2012?action=AttachFile&do=ge....

If you want to add support for a new kind of register class in GCC, do you refactor everything as you make your change? No, you'll break a dozen architectures you've never heard of. Instead, you add some logic in a self-contained way, conseratively, assuming you don't fully understand the corner cases of the existing implementation. It's much easier to understand new logic as a delta of existing behavior, which may be then partially specified, than to reimagine the logic from first principles.

That's why the law is full of "But in cases under subsection C where Z applies..." You don't refactor subsection C because you may break it. Better to specify the additional behavior in a self-contained way. You can summarize the behavior of a legal code in diagrams, the same way you can diagram the high level operation of GCC's register allocator. But the diagram isn't the code, and the diagram can't be canonical.

Re:Beautiful law: how design can make law simpler, useful an... by anonbanker on Monday January 26, 2015 @11:07PM (#8951185)
Thank you for this. I've tried to use a similar metaphor with profs in law school back in the day, but never this well. When you experience this many edge cases, it's time to refractor the code.