Good point, plentyofnous. Prisons are not just for incarceration; they're for rehabilitation. In fact, the best outcome a community should hope for is rehabilitation, rather than just someone being punished. Education is one of the best ways to help people change their perspective on the world, and I personally don't believe in medieval-style, draconian prisons because I don't believe that model best serves the community. In my opinion, if prisons are meant to be only for "punishment", this is akin to making a statement that no one is redeemable, and that every individual who makes a mistake in their life (of whatever magnitude) should not be given the chance to change their behaviour or their outlook on life, even if that does mean their liberty is still taken away from them (if that is the sentence handed down by the court). I am a firm believer in the idea that a nation's greatness is measured by how it treats its weakest and most vulnerable members. I would also add "and its most despised" to this.
If the law changes to reflect community standards, so too should the way we treat people who are incarcerated. Don't forget: people were imprisoned in the past for things that are not considered illegal today. I think it's also helpful to remember that not everyone in prison is there because of violent crime. This is a link to statistics of prisoners in Australia, and it contains plenty of interesting information:
http://www.abs.gov.au/ausstats/abs@.nsf/mf/4517.0
Cheers