I vaguely remember there was some discussion of this in 'Metamagical Themas' by Douglas Hofstader. It's been a while since if I read it, but if I remember correctly he drew some parallels between law and provability in maths - basically, you can either have a system of law which cannot cover everything you want to make laws about, or you have a system of law which does, but which has some undecidable laws. Feel free to correct if I've misremembered.