The primary function of prison is to remove risk from society. Rehabilitation is least efficient in prison, similarly as to why we learn to drive on public roads, learning to drive round a private racetrack gives you the knowledge how to operate the car, it doesn't give you the essential experience to drive on public highways.
If decent sentences were handed out and life in prison not made so cushy it would also act as a deterrent. I firmly believe that prison should be a mixture of solitary confinement and hard labour, in which case much shorter sentences could well be very effective. Also sentences should always escalate never mind how long ago the previous conviction was.
Most people behave themselves because of the consequences not because they are all goody-two-shoes, for some reason this is ignored when dealing with criminals.
In a time of universal deceit - telling the truth is a revolutionary act. George Orwell
When the debate is lost, slander becomes the tool of the loser. Socrates