The main difference between the Code of Hammurabi and modern law is that it puts forward different standards of justice for different classes of people in society. Though there are undoubted social imbalances in the administration of justice in this day and age, the justice system in most countries still strives for equality. In the Code of Hammurabi, however, it is explicitly stated that different standards of justice apply to three different classes: freedmen, slaves, and owners of property.
In practice, this would inevitably lead to what we may consider in this day and age to be manifestly unjust outcomes. For instance, a doctor who killed a rich patient could expect to have his hands cut off, whereas if he killed a slave, he'd receive no more than a fine. We can safely infer from this scale of punishments that the lives of the rich and privileged were more valued than those of slaves, who counted for little in Babylonian society.
The Code of Hammurabi was much more wedded to the punitive ideal of “an eye for an eye” than most present-day legal codes. The primary purpose of the Code was not so much restoration—and certainly not rehabilitation—as retribution. And such retribution took the form of brutal punishments, such as the cutting off of limbs.