Revenge" sound like you've penalized someone by either your feeling or emotion ,in some case both of two. you need them pained as you're.
on the contrary, punishment by law you've must to avoided sentence someone by your feeling or emotion,
But I heard too many criticise about law by they feeling