Dylann Roof is going to spend the rest of his life in prison. He will also never get to vote for president ever again. I think that's a good thing.

Roof, you'll remember, is the racist gunman who killed nine people in 2015 during his shooting rampage at Charleston's Emanuel African Methodist Episcopal Church. He wanted to start a race war. He failed. There is no punishment proportional to the crime he committed — he cannot be executed nine times over — and so the state of South Carolina, in its mercy, let him plead guilty and avoid a death sentence. That Roof's punishment also includes being excluded from the workings of American democracy seems barely worth mentioning.

Except now, it is: Sen. Bernie Sanders (I-Vt.) this week told a crowd of Democratic primary voters that he wants to re-enfranchise felons and let them vote from behind bars — even if they're "terrible people" who have committed the worst kinds of crimes against society.

Government, he said, "should not take away their inherent American right to participate in our democracy."

This is a terrible idea. Violent offenders — people who have intentionally harmed another human — shouldn't get to help choose our leaders or be a part of our collective decision-making process.

In fairness to Sanders, his position likely springs from a laudable impulse. America puts too many of its citizens, disproportionately African-American men, in prison. And once those citizens have served their sentences, this country all too often makes it difficult for these people to get jobs, vote, and otherwise re-enter their communities on a successful basis — even if they are non-violent offenders.

Things are slowly but surely starting to change on this front, and that's a good thing. The Nevada Assembly, for example, voted overwhelmingly this week to restore voting rights to felons who have completed their sentences. Florida voters in November passed a similar measure, though that state's Republican legislators are doing everything they can to dampen its effects. There's still a long way to go toward fixing the problem of over-incarceration in America, but the indicators are largely pointing in the right direction.

Letting violent felons vote from behind bars, however, goes too far.

It may be true, as prison abolitionists suggest, that the country can reduce the need for prisons and punishment by working to alleviate the social ills that give birth to crime, and that's a worthy goal. But it is also true that there are always going to be a few people in our world who are simply mean, malicious, selfish, and violent. There will always be murders, rapes, and assaults — crimes that injure and kill people, altering and ending countless lives.

Some of the people who commit those crimes can be rehabilitated, and should be restored to full rights when they rejoin the general public. But some — Roof, for example, but also the Stoneman Douglas school shooter in Florida and the Boston Marathon bombers, all of whom survived their crimes and live now behind bars — commit evil on such a scale that they cannot possibly be allowed to fully participate in society. Those people — and they are a small minority of those who actually end up in prison — shouldn't get to vote.

Sometimes, the social contract is so badly ruptured that it cannot be repaired.

It is possible to defend such punishments while acknowledging that the justice system in this country is, in too many ways, deeply messed up and often racist. It can be difficult to find the right balance between rehabilitation and punishment, and frustrating to figure out how to deal with crime firmly and fairly without going so far that we create new wounds in our communities. For most nonviolent offenders, there are probably much better ways of being held accountable and repaying debts to society than going to prison and losing the right to vote.

In that context, disenfranchisement and loss of freedom should be reserved for the very worst offenses.

At the moment — Sanders' comments notwithstanding — that seems to be the consensus among leading Democrats. Sen. Kamala Harris (D-Calif.), former Texas congressman Beto O'Rourke, and Pete Buttigieg, the mayor of South Bend, Indiana, have all said in recent days that violent offenders shouldn't vote, though they're generally more supportive of restoring voting rights for offenders who have completed their sentences. Those stances seem to be in line with voter preferences.

Political orthodoxy can shift quickly, though. It's not been long since Democrats tried to make sure that they looked tough on crime. Now? Liberals are leading the way on rehabilitation and restoration. That's good — so long as they don't forget that there really are some crimes worthy of harsh punishment. You don't have to be a perfect citizen to vote in American elections, but you shouldn't be one of the worst.