He wrote that long-term imprisonment and perpetual slavery, or banishment, were more effective deterrents. Cesare Beccaria was an Italian philosopher and thinker who lived during the 18th century. The text forwarded the idea of social contract, which is the belief that the government exists solely to serve the people, and the people are the source of the government's political power.
It also promoted utilitarianism, which is the belief that the government should only legislate in ways that provide the greatest public good.
He opposed the death penalty in most cases based on this same argument.
Beccaria felt capital punishment was needlessly severe.
To that end, the punishment need not be any more severe than what is needed to outweigh the advantages of the crime.
For example, it's not useful to give life in prison for a shoplifting case when the shoplifter will be sufficiently deterred by the threat of a month in jail.
Punishment should increase the overall amount of happiness in the world and create a better society.
In Beccaria's time, criminal punishment was often based on retribution. Deterrence is a type of prevention meaning that the threat of punishment outweighs the urge to commit a crime.
This means the people can choose to give or restrict governmental power. Beccaria claimed that criminal punishment was only justified in order to further the social contract.
For this reason, he classified treason as the most serious crime because it violates the social contract. Utilitarianism piggybacks on the social contract theory and refers to the belief that the government should only legislate in ways that provide the greatest public good.