I suppose it depends upon what you consider prison to be. A balance needs to be struck between retribution and rehibilitation. I have my views - which will inevitably be considered liberal but most will work out what I think of laws such as these.
From a British point of view, over the years we have had children who have murdered other children. Each time this happens there is a public baying for blood - quite understandable as the crimes are hideous, but the law, thankfully, rises above raw emotion. Recently two young men were released, they had killed a toddler (with a railway iron bar, I think). This happened when they were 10 and 11. Both have now been released (and renamed). Undoubtedly the victim's parent's despise the decision (I do not know this, it is a supposition) but this happened when they were children - and I'm sorry, but a child does not fully understnd the consequences of its actions. After a suitable prison term, with the goal of bringing them back into society, is the just result.
Back in the sixties (or maybe fifties) a child was murdered by a girl. She has since gone through the same processes poorly outlined above and has now got a family and is acontributing member of society. She truly regrets her actions - the biggest punishment possible.
We do have a problem with balancing retribution and rehibilitation, few countries have it correct (can it be correct?)...